forked from Kinnara/ModernWpf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppBarToggleButtonPage.xaml
85 lines (84 loc) · 4.28 KB
/
AppBarToggleButtonPage.xaml
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
<ui:Page
x:Class="ModernWpf.SampleApp.ControlPages.AppBarToggleButtonPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:sc="clr-namespace:SamplesCommon;assembly=SamplesCommon"
mc:Ignorable="d">
<ScrollViewer>
<ui:SimpleStackPanel Style="{StaticResource ControlPageContentPanelStyle}">
<sc:ControlExample
x:Name="Example1"
HeaderText="An AppBarToggleButton with a symbol icon.">
<sc:ControlExample.Example>
<StackPanel Orientation="Horizontal">
<!-- App bar button with symbol icon. -->
<ui:AppBarToggleButton x:Name="Button1" Label="SymbolIcon" Icon="Shuffle" Click="AppBarButton_Click" />
<TextBlock
x:Name="Control1Output"
Margin="8,0,0,0"
VerticalAlignment="Center" />
</StackPanel>
</sc:ControlExample.Example>
</sc:ControlExample>
<sc:ControlExample
x:Name="Example2"
HeaderText="An AppBarToggleButton with a bitmap icon.">
<sc:ControlExample.Example>
<StackPanel Orientation="Horizontal">
<!-- App bar button with bitmap icon. -->
<ui:AppBarToggleButton x:Name="Button2" Label="BitmapIcon" Click="AppBarButton_Click">
<ui:AppBarToggleButton.Icon>
<ui:BitmapIcon UriSource="/Assets/Slices2.png" />
</ui:AppBarToggleButton.Icon>
</ui:AppBarToggleButton>
<TextBlock
x:Name="Control2Output"
Margin="8,0,0,0"
VerticalAlignment="Center" />
</StackPanel>
</sc:ControlExample.Example>
</sc:ControlExample>
<sc:ControlExample
x:Name="Example3"
HeaderText="An AppBarToggleButton with a font icon.">
<sc:ControlExample.Example>
<StackPanel Orientation="Horizontal">
<!-- App bar button with font icon. -->
<ui:AppBarToggleButton x:Name="Button3" Label="FontIcon" Click="AppBarButton_Click">
<ui:AppBarToggleButton.Icon>
<ui:FontIcon
FontFamily="Candara"
Glyph="Σ" />
</ui:AppBarToggleButton.Icon>
</ui:AppBarToggleButton>
<TextBlock
x:Name="Control3Output"
Margin="8,0,0,0"
VerticalAlignment="Center" />
</StackPanel>
</sc:ControlExample.Example>
</sc:ControlExample>
<sc:ControlExample
x:Name="Example4"
HeaderText="A three-state AppBarToggleButton with a path icon.">
<sc:ControlExample.Example>
<StackPanel Orientation="Horizontal">
<!-- App bar button with path icon. -->
<ui:AppBarToggleButton x:Name="Button4" Label="PathIcon" Click="AppBarButton_Click" IsThreeState="True">
<ui:AppBarToggleButton.Icon>
<ui:PathIcon Data="F1 M 20,20L 24,10L 24,24L 5,24" />
</ui:AppBarToggleButton.Icon>
</ui:AppBarToggleButton>
<TextBlock
x:Name="Control4Output"
Margin="8,0,0,0"
VerticalAlignment="Center" />
</StackPanel>
</sc:ControlExample.Example>
</sc:ControlExample>
</ui:SimpleStackPanel>
</ScrollViewer>
</ui:Page>