|
| 1 | +<UserControl x:Class="MaterialDesignDemo.Drawers" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 5 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 6 | + xmlns:local="clr-namespace:MaterialDesignDemo" |
| 7 | + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" |
| 8 | + mc:Ignorable="d" |
| 9 | + d:DesignHeight="300" d:DesignWidth="300"> |
| 10 | + <materialDesign:DrawerHost Margin="64" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="2" BorderBrush="{DynamicResource MaterialDesignDivider}"> |
| 11 | + <materialDesign:DrawerHost.LeftDrawerContent> |
| 12 | + <StackPanel Margin="16"> |
| 13 | + <TextBlock Margin="4" HorizontalAlignment="Center">LEFT FIELD</TextBlock> |
| 14 | + <Button Command="{x:Static materialDesign:DrawerHost.CloseDrawerCommand}" |
| 15 | + CommandParameter="{x:Static Dock.Left}" |
| 16 | + Margin="4" HorizontalAlignment="Center" |
| 17 | + Style="{DynamicResource MaterialDesignFlatButton}"> |
| 18 | + CLOSE THIS |
| 19 | + </Button> |
| 20 | + <Button Command="{x:Static materialDesign:DrawerHost.CloseDrawerCommand}" |
| 21 | + Margin="4" HorizontalAlignment="Center" |
| 22 | + Style="{DynamicResource MaterialDesignFlatButton}"> |
| 23 | + CLOSE ALL |
| 24 | + </Button> |
| 25 | + </StackPanel> |
| 26 | + </materialDesign:DrawerHost.LeftDrawerContent> |
| 27 | + <materialDesign:DrawerHost.TopDrawerContent> |
| 28 | + <StackPanel Margin="16" HorizontalAlignment="Center" Orientation="Horizontal"> |
| 29 | + <TextBlock Margin="4" VerticalAlignment="Center">TOP BANANA</TextBlock> |
| 30 | + <Button Command="{x:Static materialDesign:DrawerHost.CloseDrawerCommand}" |
| 31 | + Style="{DynamicResource MaterialDesignFlatButton}" |
| 32 | + Margin="4" VerticalAlignment="Center"> |
| 33 | + CLOSE ALL |
| 34 | + </Button> |
| 35 | + <Button Command="{x:Static materialDesign:DrawerHost.CloseDrawerCommand}" |
| 36 | + CommandParameter="{x:Static Dock.Top}" |
| 37 | + Style="{DynamicResource MaterialDesignFlatButton}" |
| 38 | + Margin="4" VerticalAlignment="Center"> |
| 39 | + CLOSE THIS |
| 40 | + </Button> |
| 41 | + </StackPanel> |
| 42 | + </materialDesign:DrawerHost.TopDrawerContent> |
| 43 | + <materialDesign:DrawerHost.RightDrawerContent> |
| 44 | + <StackPanel Margin="16"> |
| 45 | + <TextBlock Margin="4" HorizontalAlignment="Center">THE RIGHT STUFF</TextBlock> |
| 46 | + <Button Command="{x:Static materialDesign:DrawerHost.CloseDrawerCommand}" |
| 47 | + CommandParameter="{x:Static Dock.Right}" |
| 48 | + Margin="4" HorizontalAlignment="Center" |
| 49 | + Style="{DynamicResource MaterialDesignFlatButton}"> |
| 50 | + CLOSE THIS |
| 51 | + </Button> |
| 52 | + <Button Command="{x:Static materialDesign:DrawerHost.CloseDrawerCommand}" |
| 53 | + Margin="4" HorizontalAlignment="Center" |
| 54 | + Style="{DynamicResource MaterialDesignFlatButton}"> |
| 55 | + CLOSE ALL |
| 56 | + </Button> |
| 57 | + </StackPanel> |
| 58 | + </materialDesign:DrawerHost.RightDrawerContent> |
| 59 | + <materialDesign:DrawerHost.BottomDrawerContent> |
| 60 | + <StackPanel Margin="16" HorizontalAlignment="Center" Orientation="Horizontal"> |
| 61 | + <TextBlock Margin="4" VerticalAlignment="Center">BOTTOM BRACKET</TextBlock> |
| 62 | + <Button Command="{x:Static materialDesign:DrawerHost.CloseDrawerCommand}" |
| 63 | + Style="{DynamicResource MaterialDesignFlatButton}" |
| 64 | + Margin="4" VerticalAlignment="Center"> |
| 65 | + CLOSE ALL |
| 66 | + </Button> |
| 67 | + <Button Command="{x:Static materialDesign:DrawerHost.CloseDrawerCommand}" |
| 68 | + CommandParameter="{x:Static Dock.Bottom}" |
| 69 | + Style="{DynamicResource MaterialDesignFlatButton}" |
| 70 | + Margin="4" VerticalAlignment="Center"> |
| 71 | + CLOSE THIS |
| 72 | + </Button> |
| 73 | + </StackPanel> |
| 74 | + </materialDesign:DrawerHost.BottomDrawerContent> |
| 75 | + <Grid MinWidth="480" MinHeight="480"> |
| 76 | + <Grid VerticalAlignment="Center" HorizontalAlignment="Center"> |
| 77 | + <Grid.RowDefinitions> |
| 78 | + <RowDefinition /> |
| 79 | + <RowDefinition /> |
| 80 | + <RowDefinition /> |
| 81 | + </Grid.RowDefinitions> |
| 82 | + <Grid.ColumnDefinitions> |
| 83 | + <ColumnDefinition /> |
| 84 | + <ColumnDefinition /> |
| 85 | + <ColumnDefinition /> |
| 86 | + </Grid.ColumnDefinitions> |
| 87 | + <Button Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}" |
| 88 | + CommandParameter="{x:Static Dock.Left}" |
| 89 | + Grid.Row="1" Grid.Column="0" Margin="4"> |
| 90 | + <materialDesign:PackIcon Kind="ArrowLeft" /> |
| 91 | + </Button> |
| 92 | + <Button Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}" |
| 93 | + CommandParameter="{x:Static Dock.Top}" |
| 94 | + Grid.Row="0" Grid.Column="1" Margin="4"> |
| 95 | + <materialDesign:PackIcon Kind="ArrowUp" /> |
| 96 | + </Button> |
| 97 | + <Button Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}" |
| 98 | + CommandParameter="{x:Static Dock.Right}" |
| 99 | + Grid.Row="1" Grid.Column="2" Margin="4"> |
| 100 | + <materialDesign:PackIcon Kind="ArrowRight" /> |
| 101 | + </Button> |
| 102 | + <Button Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}" |
| 103 | + CommandParameter="{x:Static Dock.Bottom}" |
| 104 | + Grid.Row="2" Grid.Column="1" Margin="4"> |
| 105 | + <materialDesign:PackIcon Kind="ArrowDown" /> |
| 106 | + </Button> |
| 107 | + <Button Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}" |
| 108 | + Grid.Row="1" Grid.Column="1" Margin="4" |
| 109 | + Style="{DynamicResource MaterialDesignRaisedAccentButton}"> |
| 110 | + <materialDesign:PackIcon Kind="ArrowAll" /> |
| 111 | + </Button> |
| 112 | + </Grid> |
| 113 | + </Grid> |
| 114 | + </materialDesign:DrawerHost> |
| 115 | +</UserControl> |
0 commit comments