Skip to content

Commit 055d516

Browse files
committed
Succesfully injected XamlDisplayerPanel into ColorZones.xaml
1 parent 51f36c1 commit 055d516

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

MainDemo.Wpf/ColorZones.xaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
7+
xmlns:codeDisplayer="clr-namespace:CodeDisplayer;assembly=CodeDisplayer"
78
mc:Ignorable="d"
89
d:DesignHeight="800" d:DesignWidth="600">
910
<ScrollViewer>
10-
<StackPanel Margin="16">
11-
<TextBlock FontSize="16">Colour Zones</TextBlock>
12-
<TextBlock TextWrapping="Wrap" Margin="0 16 0 0">The ColorZone control allows you to easily define striking blocks of colour to give your application extra clarity and style, whilst still remaining within the bounds of your Material Design palette.</TextBlock>
13-
<TextBlock Margin="0 16 0 0" FontSize="10">Invert the basic paper/body colours.</TextBlock>
11+
<codeDisplayer:XamlDisplayerPanel x:Name="XamlDisplayerPanel">
12+
<StackPanel Margin="16">
13+
<TextBlock FontSize="16">Colour Zones</TextBlock>
14+
<TextBlock TextWrapping="Wrap" MaxWidth="200" Margin="0 16 0 0">The ColorZone control allows you to easily define striking blocks of colour to give your application extra clarity and style, whilst still remaining within the bounds of your Material Design palette.</TextBlock>
15+
<TextBlock Margin="0 16 0 0" FontSize="10">Invert the basic paper/body colours.</TextBlock>
16+
</StackPanel>
1417
<materialDesign:ColorZone Mode="Inverted" Padding="16">
1518
<DockPanel>
1619
<materialDesign:PopupBox DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges">
@@ -26,7 +29,7 @@
2629
</StackPanel>
2730
</DockPanel>
2831
</materialDesign:ColorZone>
29-
<TextBlock Margin="0 16 0 0" FontSize="10">Use primary light back and fore colours.</TextBlock>
32+
<TextBlock Margin="0 16 0 0" TextWrapping="Wrap" FontSize="10">Use primary light back and fore colours.</TextBlock>
3033
<materialDesign:ColorZone Mode="PrimaryLight" Padding="16">
3134
<StackPanel Orientation="Horizontal">
3235
<ToggleButton Style="{DynamicResource MaterialDesignHamburgerToggleButton}" />
@@ -81,7 +84,6 @@
8184
<TextBlock VerticalAlignment="Center" Margin="16 0 0 0">Material Design In XAML Toolkit</TextBlock>
8285
</StackPanel>
8386
</materialDesign:ColorZone>
84-
</StackPanel>
87+
</codeDisplayer:XamlDisplayerPanel>
8588
</ScrollViewer>
86-
8789
</UserControl>

MainDemo.Wpf/ColorZones.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
using System.Windows.Media.Imaging;
1313
using System.Windows.Navigation;
1414
using System.Windows.Shapes;
15+
using CodeDisplayer;
16+
using MaterialDesignDemo.Helper;
1517

1618
namespace MaterialDesignColors.WpfExample
1719
{
@@ -23,6 +25,7 @@ public partial class ColorZones : UserControl
2325
public ColorZones()
2426
{
2527
InitializeComponent();
28+
XamlDisplayerPanel.Initialize(new SourceRouter(this.GetType().Name).GetSource());
2629
}
2730
}
2831
}

0 commit comments

Comments
 (0)