|
34 | 34 | </Window.Resources>
|
35 | 35 |
|
36 | 36 | <wpf:DialogHost Identifier="RootDialog">
|
37 |
| - <DockPanel> |
38 |
| - <wpf:ColorZone Padding="16" wpf:ShadowAssist.ShadowDepth="Depth2" |
39 |
| - Mode="PrimaryMid" DockPanel.Dock="Top"> |
40 |
| - <DockPanel> |
41 |
| - <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="True" |
42 |
| - x:Name="MenuToggleButton"/> |
43 |
| - <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22">Material Design In XAML Toolkit</TextBlock> |
44 |
| - </DockPanel> |
45 |
| - </wpf:ColorZone> |
46 |
| - <ListBox DockPanel.Dock="Left" x:Name="DemoItemsListBox" Margin="16 16 0 16" SelectedIndex="0" |
47 |
| - Background="{DynamicResource PrimaryHueMidBrush}" |
48 |
| - Foreground="{DynamicResource PrimaryHueMidForegroundBrush}" |
49 |
| - Visibility="{Binding ElementName=MenuToggleButton, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"> |
50 |
| - <ListBox.ItemTemplate> |
51 |
| - <DataTemplate DataType="domain:DemoItem"> |
52 |
| - <TextBlock Text="{Binding Name}" /> |
53 |
| - </DataTemplate> |
54 |
| - </ListBox.ItemTemplate> |
55 |
| - <domain:DemoItem Name="Home"> |
56 |
| - <domain:DemoItem.Content> |
57 |
| - <wpfExample:Home /> |
58 |
| - </domain:DemoItem.Content> |
59 |
| - </domain:DemoItem> |
60 |
| - <domain:DemoItem Name="Palette"> |
61 |
| - <domain:DemoItem.Content> |
62 |
| - <wpfExample:PaletteSelector> |
63 |
| - <wpfExample:PaletteSelector.DataContext> |
64 |
| - <wpfExample:PaletteSelectorViewModel /> |
65 |
| - </wpfExample:PaletteSelector.DataContext> |
66 |
| - </wpfExample:PaletteSelector> |
67 |
| - </domain:DemoItem.Content> |
68 |
| - </domain:DemoItem> |
69 |
| - <domain:DemoItem Name="Buttons & Toggles"> |
70 |
| - <domain:DemoItem.Content> |
71 |
| - <wpfExample:Buttons /> |
72 |
| - </domain:DemoItem.Content> |
73 |
| - </domain:DemoItem> |
74 |
| - <domain:DemoItem Name="Fields"> |
75 |
| - <domain:DemoItem.Content> |
76 |
| - <wpfExample:TextFields /> |
77 |
| - </domain:DemoItem.Content> |
78 |
| - </domain:DemoItem> |
79 |
| - <domain:DemoItem Name="Cards"> |
80 |
| - <domain:DemoItem.Content> |
81 |
| - <wpfExample:Cards /> |
82 |
| - </domain:DemoItem.Content> |
83 |
| - </domain:DemoItem> |
84 |
| - <domain:DemoItem Name="Colour Zones"> |
85 |
| - <domain:DemoItem.Content> |
86 |
| - <wpfExample:ColorZones /> |
87 |
| - </domain:DemoItem.Content> |
88 |
| - </domain:DemoItem> |
89 |
| - <domain:DemoItem Name="Lists"> |
90 |
| - <domain:DemoItem.Content> |
91 |
| - <wpfExample:Lists> |
92 |
| - <wpfExample:Lists.DataContext> |
93 |
| - <domain:ListsAndGridsViewModel /> |
94 |
| - </wpfExample:Lists.DataContext> |
95 |
| - </wpfExample:Lists> |
96 |
| - </domain:DemoItem.Content> |
97 |
| - </domain:DemoItem> |
98 |
| - <domain:DemoItem Name="Trees"> |
99 |
| - <domain:DemoItem.Content> |
100 |
| - <wpfExample:Trees /> |
101 |
| - </domain:DemoItem.Content> |
102 |
| - </domain:DemoItem> |
103 |
| - <domain:DemoItem Name="Grids"> |
104 |
| - <domain:DemoItem.Content> |
105 |
| - <wpfExample:Grids> |
106 |
| - <wpfExample:Grids.DataContext> |
107 |
| - <domain:ListsAndGridsViewModel /> |
108 |
| - </wpfExample:Grids.DataContext> |
109 |
| - </wpfExample:Grids> |
110 |
| - </domain:DemoItem.Content> |
111 |
| - </domain:DemoItem> |
112 |
| - <domain:DemoItem Name="Menus & Tool Bars"> |
113 |
| - <domain:DemoItem.Content> |
114 |
| - <wpfExample:MenusAndToolBars /> |
115 |
| - </domain:DemoItem.Content> |
116 |
| - </domain:DemoItem> |
117 |
| - <domain:DemoItem Name="Progress Indicators"> |
118 |
| - <domain:DemoItem.Content> |
119 |
| - <wpfExample:Progress /> |
120 |
| - </domain:DemoItem.Content> |
121 |
| - </domain:DemoItem> |
122 |
| - <domain:DemoItem Name="Dialogs"> |
123 |
| - <domain:DemoItem.Content> |
124 |
| - <wpfExample:Dialogs> |
125 |
| - <wpfExample:Dialogs.DataContext> |
126 |
| - <domain:DialogsViewModel /> |
127 |
| - </wpfExample:Dialogs.DataContext> |
128 |
| - </wpfExample:Dialogs> |
129 |
| - </domain:DemoItem.Content> |
130 |
| - </domain:DemoItem> |
131 |
| - <domain:DemoItem Name="Shadows"> |
132 |
| - <domain:DemoItem.Content> |
133 |
| - <wpfExample:Shadows /> |
134 |
| - </domain:DemoItem.Content> |
135 |
| - </domain:DemoItem> |
136 |
| - </ListBox> |
137 |
| - <ContentControl Margin="16" Content="{Binding ElementName=DemoItemsListBox, Path=SelectedItem.Content}" /> |
138 |
| - </DockPanel> |
| 37 | + <wpf:DrawerHost IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}"> |
| 38 | + <wpf:DrawerHost.LeftDrawerContent> |
| 39 | + <StackPanel Orientation="Vertical"> |
| 40 | + <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" |
| 41 | + HorizontalAlignment="Right" Margin="16" |
| 42 | + IsChecked="{Binding ElementName=MenuToggleButton, Path=IsChecked, Mode=TwoWay}" /> |
| 43 | + <ListBox x:Name="DemoItemsListBox" Margin="0 16 0 16" SelectedIndex="0" |
| 44 | + PreviewMouseLeftButtonUp="UIElement_OnPreviewMouseLeftButtonUp" |
| 45 | + Visibility="{Binding ElementName=MenuToggleButton, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"> |
| 46 | + <ListBox.ItemTemplate> |
| 47 | + <DataTemplate DataType="domain:DemoItem"> |
| 48 | + <TextBlock Text="{Binding Name}" Margin="32 0 32 0" /> |
| 49 | + </DataTemplate> |
| 50 | + </ListBox.ItemTemplate> |
| 51 | + <domain:DemoItem Name="Home"> |
| 52 | + <domain:DemoItem.Content> |
| 53 | + <wpfExample:Home /> |
| 54 | + </domain:DemoItem.Content> |
| 55 | + </domain:DemoItem> |
| 56 | + <domain:DemoItem Name="Palette"> |
| 57 | + <domain:DemoItem.Content> |
| 58 | + <wpfExample:PaletteSelector> |
| 59 | + <wpfExample:PaletteSelector.DataContext> |
| 60 | + <wpfExample:PaletteSelectorViewModel /> |
| 61 | + </wpfExample:PaletteSelector.DataContext> |
| 62 | + </wpfExample:PaletteSelector> |
| 63 | + </domain:DemoItem.Content> |
| 64 | + </domain:DemoItem> |
| 65 | + <domain:DemoItem Name="Buttons & Toggles"> |
| 66 | + <domain:DemoItem.Content> |
| 67 | + <wpfExample:Buttons /> |
| 68 | + </domain:DemoItem.Content> |
| 69 | + </domain:DemoItem> |
| 70 | + <domain:DemoItem Name="Fields"> |
| 71 | + <domain:DemoItem.Content> |
| 72 | + <wpfExample:TextFields /> |
| 73 | + </domain:DemoItem.Content> |
| 74 | + </domain:DemoItem> |
| 75 | + <domain:DemoItem Name="Cards"> |
| 76 | + <domain:DemoItem.Content> |
| 77 | + <wpfExample:Cards /> |
| 78 | + </domain:DemoItem.Content> |
| 79 | + </domain:DemoItem> |
| 80 | + <domain:DemoItem Name="Colour Zones"> |
| 81 | + <domain:DemoItem.Content> |
| 82 | + <wpfExample:ColorZones /> |
| 83 | + </domain:DemoItem.Content> |
| 84 | + </domain:DemoItem> |
| 85 | + <domain:DemoItem Name="Lists"> |
| 86 | + <domain:DemoItem.Content> |
| 87 | + <wpfExample:Lists> |
| 88 | + <wpfExample:Lists.DataContext> |
| 89 | + <domain:ListsAndGridsViewModel /> |
| 90 | + </wpfExample:Lists.DataContext> |
| 91 | + </wpfExample:Lists> |
| 92 | + </domain:DemoItem.Content> |
| 93 | + </domain:DemoItem> |
| 94 | + <domain:DemoItem Name="Trees"> |
| 95 | + <domain:DemoItem.Content> |
| 96 | + <wpfExample:Trees /> |
| 97 | + </domain:DemoItem.Content> |
| 98 | + </domain:DemoItem> |
| 99 | + <domain:DemoItem Name="Grids"> |
| 100 | + <domain:DemoItem.Content> |
| 101 | + <wpfExample:Grids> |
| 102 | + <wpfExample:Grids.DataContext> |
| 103 | + <domain:ListsAndGridsViewModel /> |
| 104 | + </wpfExample:Grids.DataContext> |
| 105 | + </wpfExample:Grids> |
| 106 | + </domain:DemoItem.Content> |
| 107 | + </domain:DemoItem> |
| 108 | + <domain:DemoItem Name="Menus & Tool Bars"> |
| 109 | + <domain:DemoItem.Content> |
| 110 | + <wpfExample:MenusAndToolBars /> |
| 111 | + </domain:DemoItem.Content> |
| 112 | + </domain:DemoItem> |
| 113 | + <domain:DemoItem Name="Progress Indicators"> |
| 114 | + <domain:DemoItem.Content> |
| 115 | + <wpfExample:Progress /> |
| 116 | + </domain:DemoItem.Content> |
| 117 | + </domain:DemoItem> |
| 118 | + <domain:DemoItem Name="Dialogs"> |
| 119 | + <domain:DemoItem.Content> |
| 120 | + <wpfExample:Dialogs> |
| 121 | + <wpfExample:Dialogs.DataContext> |
| 122 | + <domain:DialogsViewModel /> |
| 123 | + </wpfExample:Dialogs.DataContext> |
| 124 | + </wpfExample:Dialogs> |
| 125 | + </domain:DemoItem.Content> |
| 126 | + </domain:DemoItem> |
| 127 | + <domain:DemoItem Name="Shadows"> |
| 128 | + <domain:DemoItem.Content> |
| 129 | + <wpfExample:Shadows /> |
| 130 | + </domain:DemoItem.Content> |
| 131 | + </domain:DemoItem> |
| 132 | + </ListBox> |
| 133 | + </StackPanel> |
| 134 | + </wpf:DrawerHost.LeftDrawerContent> |
| 135 | + <DockPanel> |
| 136 | + <wpf:ColorZone Padding="16" wpf:ShadowAssist.ShadowDepth="Depth2" |
| 137 | + Mode="PrimaryMid" DockPanel.Dock="Top"> |
| 138 | + <DockPanel> |
| 139 | + <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="False" |
| 140 | + x:Name="MenuToggleButton"/> |
| 141 | + <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22">Material Design In XAML Toolkit</TextBlock> |
| 142 | + </DockPanel> |
| 143 | + </wpf:ColorZone> |
| 144 | + <ContentControl Margin="16" Content="{Binding ElementName=DemoItemsListBox, Path=SelectedItem.Content}" /> |
| 145 | + </DockPanel> |
| 146 | + </wpf:DrawerHost> |
139 | 147 | </wpf:DialogHost>
|
140 | 148 | </Window>
|
0 commit comments