Repository navigation
Expand file tree
/
Copy pathShell.xaml
More file actions
181 lines (162 loc) · 9.92 KB
/
Copy pathShell.xaml
File metadata and controls
181 lines (162 loc) · 9.92 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<Page
x:Class="Microsoft.Toolkit.Uwp.SampleApp.Shell"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:controlsLocal="using:Microsoft.Toolkit.Uwp.SampleApp.Controls"
mc:Ignorable="d">
<Page.Resources>
<DataTemplate x:Key="ButtonTemplate" x:DataType="local:SampleCategory">
<Grid Width="240" Height="48">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="48" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image Source="{x:Bind Icon}" Stretch="Uniform" Margin="12" />
<TextBlock Grid.Column="1" Text="{x:Bind Name}" Foreground="White" FontSize="16" VerticalAlignment="Center" />
</Grid>
</DataTemplate>
<DataTemplate x:Key="OptionTemplate" x:DataType="local:Option">
<Grid Width="240" Height="48">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="48" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<FontIcon Grid.Column="0" Margin="12" FontFamily="Segoe MDL2 Assets" Glyph="{x:Bind Glyph}" Foreground="White" />
<TextBlock Grid.Column="1" Text="{x:Bind Name}" Foreground="White" FontSize="16" VerticalAlignment="Center" />
</Grid>
</DataTemplate>
</Page.Resources>
<controls:HamburgerMenu PaneBackground="{StaticResource Brush-Grey-02}" x:Name="HamburgerMenu"
ItemClick="HamburgerMenu_OnItemClick"
Foreground="{StaticResource Brush-Grey-04}"
ItemTemplate="{StaticResource ButtonTemplate}"
OptionsItemTemplate="{StaticResource OptionTemplate}"
OptionsItemClick="HamburgerMenu_OnOptionsItemClick">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="WindowStates">
<VisualState x:Name="NarrowState">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="0"/>
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="InfoAreaGrid.(Grid.Row)" Value="1"/>
<Setter Target="InfoAreaGrid.(Grid.Column)" Value="0"/>
<Setter Target="InfoAreaGrid.(Grid.RowSpan)" Value="1"/>
<Setter Target="InfoAreaGrid.(Grid.ColumnSpan)" Value="2"/>
<Setter Target="DemoAreaGrid.(Grid.Row)" Value="0"/>
<Setter Target="DemoAreaGrid.(Grid.Column)" Value="0"/>
<Setter Target="DemoAreaGrid.(Grid.RowSpan)" Value="1"/>
<Setter Target="DemoAreaGrid.(Grid.ColumnSpan)" Value="2"/>
<Setter Target="ExpandButton.Content" Value=""/>
<Setter Target="Splitter.Visibility" Value="Collapsed"></Setter>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="MediumState">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="600"/>
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="InfoAreaGrid.(Grid.Row)" Value="1"/>
<Setter Target="InfoAreaGrid.(Grid.Column)" Value="0"/>
<Setter Target="InfoAreaGrid.(Grid.RowSpan)" Value="1"/>
<Setter Target="InfoAreaGrid.(Grid.ColumnSpan)" Value="2"/>
<Setter Target="DemoAreaGrid.(Grid.Row)" Value="0"/>
<Setter Target="DemoAreaGrid.(Grid.Column)" Value="0"/>
<Setter Target="DemoAreaGrid.(Grid.RowSpan)" Value="1"/>
<Setter Target="DemoAreaGrid.(Grid.ColumnSpan)" Value="2"/>
<Setter Target="ExpandButton.Content" Value=""/>
<Setter Target="Splitter.Visibility" Value="Collapsed"></Setter>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="WideState">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="1200"/>
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="InfoAreaGrid.(Grid.Row)" Value="0"/>
<Setter Target="InfoAreaGrid.(Grid.Column)" Value="1"/>
<Setter Target="InfoAreaGrid.(Grid.RowSpan)" Value="2"/>
<Setter Target="InfoAreaGrid.(Grid.ColumnSpan)" Value="1"/>
<Setter Target="DemoAreaGrid.(Grid.Row)" Value="0"/>
<Setter Target="DemoAreaGrid.(Grid.Column)" Value="0"/>
<Setter Target="DemoAreaGrid.(Grid.RowSpan)" Value="2"/>
<Setter Target="DemoAreaGrid.(Grid.ColumnSpan)" Value="1"/>
<Setter Target="ExpandButton.Content" Value=""/>
<Setter Target="Splitter.Visibility" Value="Visible"></Setter>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid Background="{StaticResource Brush-Grey-05}" x:Name="RootGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="32"/>
</Grid.RowDefinitions>
<Grid x:Name="DemoAreaGrid">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="UWP Community Toolkit" Margin="0,24,0,0" FontSize="32" FontWeight="Light" Foreground="{StaticResource Brush-Grey-03}" TextWrapping="Wrap"/>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="Sample App" Margin="0" FontSize="18.667" FontWeight="Light" Foreground="{StaticResource Brush-Grey-03}"/>
</StackPanel>
<Frame x:Name="NavigationFrame" />
</Grid>
<Grid x:Name="InfoAreaGrid" Background="{StaticResource Brush-Grey-04}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<Grid Background="#FFCCCCCC">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button x:Name="ExpandButton" Click="ExpandButton_Click" FontFamily="Segoe MDL2 Assets" VerticalAlignment="Stretch" />
<TextBlock Grid.Column="1" x:Name="Title" Text="" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="12,6" Foreground="{StaticResource Brush-Grey-01}" />
</Grid>
<Pivot Grid.Row="1" HeaderTemplate="{StaticResource PivotHeaderTemplate}" x:Name="InfoAreaPivot" SelectionChanged="InfoAreaPivot_OnSelectionChanged">
<PivotItem Header="PROPERTIES" x:Name="PropertiesPivotItem">
<ScrollViewer>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<controlsLocal:PropertyControl x:Name="Properties"/>
<StackPanel Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Stretch" x:Name="CommandArea"></StackPanel>
</Grid>
</ScrollViewer>
</PivotItem>
<PivotItem Header="XAML" x:Name="XamlPivotItem">
<controlsLocal:CodeRenderer x:Name="XamlCodeRenderer" Grid.Row="0"></controlsLocal:CodeRenderer>
</PivotItem>
<PivotItem Header="CODE" x:Name="CSharpPivotItem">
<controlsLocal:CodeRenderer x:Name="CSharpCodeRenderer" Grid.Row="0"></controlsLocal:CodeRenderer>
</PivotItem>
<PivotItem Header="JAVASCRIPT" x:Name="JavaScriptPivotItem">
<controlsLocal:CodeRenderer x:Name="JavaScriptCodeRenderer" Grid.Row="0"></controlsLocal:CodeRenderer>
</PivotItem>
</Pivot>
<controls:GridSplitter
x:Name="Splitter"
Width="11"
Background="{StaticResource Brush-Grey-04}"
HorizontalAlignment="Left"
ParentLevel="1"
Grid.Row="1"
GripperForeground="White">
</controls:GridSplitter>
</Grid>
<Grid x:Name="waitRing" Visibility="Collapsed" Grid.RowSpan="2" Grid.ColumnSpan="2">
<Rectangle Fill="Black" Opacity="0.2"></Rectangle>
<ProgressRing VerticalAlignment="Center" HorizontalAlignment="Center" Width="100" Height="100" IsActive="True" Foreground="{StaticResource ApplicationForegroundThemeBrush}"></ProgressRing>
</Grid>
</Grid>
</controls:HamburgerMenu>
</Page>