Skip to content

Commit 1795360

Browse files
Updates to demo app to showcase some new features (#2374)
* Add examples for Clock and Calendar Styles * Showcase some drawer features
1 parent caa0118 commit 1795360

File tree

2 files changed

+647
-398
lines changed

2 files changed

+647
-398
lines changed

MainDemo.Wpf/Drawers.xaml

Lines changed: 60 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,13 @@
4242
<materialDesign:DrawerHost
4343
x:Name="DrawerHost"
4444
Margin="32"
45+
Height="480" Width="480"
4546
HorizontalAlignment="Center"
4647
VerticalAlignment="Center"
4748
BorderThickness="2"
48-
BorderBrush="{DynamicResource MaterialDesignDivider}">
49+
BorderBrush="{DynamicResource MaterialDesignDivider}"
50+
BottomDrawerCornerRadius="20 20 0 0"
51+
BottomDrawerBackground="{DynamicResource SecondaryHueLightBrush}">
4952

5053
<materialDesign:DrawerHost.Style>
5154
<Style TargetType="materialDesign:DrawerHost" BasedOn="{StaticResource {x:Type materialDesign:DrawerHost}}">
@@ -140,7 +143,8 @@
140143
<TextBlock
141144
Margin="4"
142145
VerticalAlignment="Center"
143-
Text="BOTTOM BRACKET"/>
146+
Text="BOTTOM BRACKET"
147+
Foreground="{DynamicResource SecondaryHueLightBrushForeground}"/>
144148

145149
<Button
146150
Command="{x:Static materialDesign:DrawerHost.CloseDrawerCommand}"
@@ -160,64 +164,61 @@
160164
</materialDesign:DrawerHost.BottomDrawerContent>
161165

162166
<Grid
163-
MinWidth="480"
164-
MinHeight="480">
165-
<Grid
166-
VerticalAlignment="Center"
167-
HorizontalAlignment="Center">
168-
<Grid.RowDefinitions>
169-
<RowDefinition />
170-
<RowDefinition />
171-
<RowDefinition />
172-
</Grid.RowDefinitions>
173-
174-
<Grid.ColumnDefinitions>
175-
<ColumnDefinition />
176-
<ColumnDefinition />
177-
<ColumnDefinition />
178-
</Grid.ColumnDefinitions>
179-
180-
<Button
181-
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
182-
CommandParameter="{x:Static Dock.Left}"
183-
Grid.Row="1"
184-
Grid.Column="0"
185-
Margin="4"
186-
Content="{materialDesign:PackIcon Kind=ArrowLeft}"/>
187-
188-
<Button
189-
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
190-
CommandParameter="{x:Static Dock.Top}"
191-
Grid.Row="0"
192-
Grid.Column="1"
193-
Margin="4"
194-
Content="{materialDesign:PackIcon Kind=ArrowUp}"/>
195-
196-
<Button
197-
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
198-
CommandParameter="{x:Static Dock.Right}"
199-
Grid.Row="1"
200-
Grid.Column="2"
201-
Margin="4"
202-
Content="{materialDesign:PackIcon Kind=ArrowRight}"/>
203-
204-
<Button
205-
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
206-
CommandParameter="{x:Static Dock.Bottom}"
207-
Grid.Row="2"
208-
Grid.Column="1"
209-
Margin="4"
210-
Content="{materialDesign:PackIcon Kind=ArrowDown}"/>
211-
212-
<Button
213-
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
214-
Grid.Row="1"
215-
Grid.Column="1"
216-
Margin="4"
217-
Style="{DynamicResource MaterialDesignRaisedAccentButton}"
218-
Content="{materialDesign:PackIcon Kind=ArrowAll}"/>
219-
</Grid>
167+
VerticalAlignment="Center"
168+
HorizontalAlignment="Center">
169+
<Grid.RowDefinitions>
170+
<RowDefinition />
171+
<RowDefinition />
172+
<RowDefinition />
173+
</Grid.RowDefinitions>
174+
175+
<Grid.ColumnDefinitions>
176+
<ColumnDefinition />
177+
<ColumnDefinition />
178+
<ColumnDefinition />
179+
</Grid.ColumnDefinitions>
180+
181+
<Button
182+
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
183+
CommandParameter="{x:Static Dock.Left}"
184+
Grid.Row="1"
185+
Grid.Column="0"
186+
Margin="4"
187+
Content="{materialDesign:PackIcon Kind=ArrowLeft}"/>
188+
189+
<Button
190+
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
191+
CommandParameter="{x:Static Dock.Top}"
192+
Grid.Row="0"
193+
Grid.Column="1"
194+
Margin="4"
195+
Content="{materialDesign:PackIcon Kind=ArrowUp}"/>
196+
197+
<Button
198+
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
199+
CommandParameter="{x:Static Dock.Right}"
200+
Grid.Row="1"
201+
Grid.Column="2"
202+
Margin="4"
203+
Content="{materialDesign:PackIcon Kind=ArrowRight}"/>
204+
205+
<Button
206+
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
207+
CommandParameter="{x:Static Dock.Bottom}"
208+
Grid.Row="2"
209+
Grid.Column="1"
210+
Margin="4"
211+
Content="{materialDesign:PackIcon Kind=ArrowDown}"/>
212+
213+
<Button
214+
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
215+
Grid.Row="1"
216+
Grid.Column="1"
217+
Margin="4"
218+
Style="{DynamicResource MaterialDesignRaisedAccentButton}"
219+
Content="{materialDesign:PackIcon Kind=ArrowAll}"/>
220220
</Grid>
221+
221222
</materialDesign:DrawerHost>
222223
</smtx:XamlDisplay>
223224
</DockPanel>

0 commit comments

Comments
 (0)