Repository navigation
Expand file tree
/
Copy pathDrawerExample.xaml
More file actions
147 lines (146 loc) · 6.69 KB
/
Copy pathDrawerExample.xaml
File metadata and controls
147 lines (146 loc) · 6.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<UserControl
x:Class="WPFDevelopers.Samples.ExampleViews.DrawerExample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:WPFDevelopers.Samples.ExampleViews"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<controls:CodeViewer Header="{Binding NavigateMenuItem.Name}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<wd:Drawer
x:Name="MyDrawerTop"
Margin="2"
Position="Top">
<wd:Drawer.Header>
<Grid Height="120">
<StackPanel HorizontalAlignment="Center">
<TextBlock FontSize="18" Text="Drawer" />
<Button HorizontalAlignment="Center" Content="contents..." />
</StackPanel>
</Grid>
</wd:Drawer.Header>
<wd:Drawer.Content>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom">
<TextBlock Text="抽屉从顶部置滑出,点击遮罩区关闭。" />
<Button
Margin="0,10"
HorizontalAlignment="Center"
Click="ButtonTop_Click"
Content="Open"
Style="{StaticResource WD.PrimaryButton}" />
</StackPanel>
</wd:Drawer.Content>
</wd:Drawer>
<wd:Drawer
x:Name="MyDrawerBottom"
Grid.Column="1"
Margin="2"
wd:ElementHelper.CornerRadius="3"
Position="Bottom">
<wd:Drawer.Header>
<Grid Height="130">
<StackPanel HorizontalAlignment="Center">
<TextBlock FontSize="18" Text="Drawer" />
<Button
HorizontalAlignment="Center"
wd:ElementHelper.CornerRadius="3"
Content="contents..."
Style="{StaticResource WD.DangerDefaultButton}" />
</StackPanel>
</Grid>
</wd:Drawer.Header>
<wd:Drawer.Content>
<StackPanel HorizontalAlignment="Center">
<TextBlock Text="抽屉从底部滑出,点击遮罩区关闭。" />
<Button
Margin="0,10"
HorizontalAlignment="Center"
wd:ElementHelper.CornerRadius="3"
Click="ButtonBottom_Click"
Content="Open"
Style="{StaticResource WD.DangerPrimaryButton}" />
</StackPanel>
</wd:Drawer.Content>
</wd:Drawer>
<wd:Drawer
x:Name="MyDrawerLeft"
Grid.Row="1"
Margin="2"
wd:ElementHelper.CornerRadius="3"
Position="Left">
<wd:Drawer.Header>
<Grid Width="140" Background="HotPink">
<StackPanel>
<TextBlock
HorizontalAlignment="Center"
FontSize="18"
Text="Drawer" />
<Button
HorizontalAlignment="Center"
wd:ElementHelper.CornerRadius="3"
Content="contents..."
Style="{StaticResource WD.SuccessDefaultButton}" />
</StackPanel>
</Grid>
</wd:Drawer.Header>
<StackPanel HorizontalAlignment="Center">
<TextBlock Text="抽屉从左侧滑出,点击遮罩区关闭。" />
<Button
Margin="0,10"
HorizontalAlignment="Center"
wd:ElementHelper.CornerRadius="3"
Click="ButtonLeft_Click"
Content="Open"
Style="{StaticResource WD.SuccessPrimaryButton}" />
</StackPanel>
</wd:Drawer>
<wd:Drawer
x:Name="MyDrawerRight"
Grid.Row="1"
Grid.Column="1"
Margin="2"
Position="Right">
<wd:Drawer.Header>
<Grid Width="100">
<StackPanel HorizontalAlignment="Center">
<TextBlock
HorizontalAlignment="Center"
FontSize="18"
Text="Drawer" />
<Button
HorizontalAlignment="Center"
Content="contents..."
Style="{StaticResource WD.WarningDefaultButton}" />
</StackPanel>
</Grid>
</wd:Drawer.Header>
<StackPanel HorizontalAlignment="Center">
<TextBlock Text="抽屉从右侧滑出,点击遮罩区关闭。" />
<Button
Margin="0,10"
HorizontalAlignment="Center"
Click="ButtonRight_Click"
Content="Open"
Style="{StaticResource WD.WarningPrimaryButton}" />
</StackPanel>
</wd:Drawer>
</Grid>
<controls:CodeViewer.SourceCodes>
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/DrawerExample.xaml" CodeType="Xaml" />
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/DrawerExample.xaml.cs" CodeType="CSharp" />
</controls:CodeViewer.SourceCodes>
</controls:CodeViewer>
</UserControl>