Skip to content

Commit b1a81c0

Browse files
author
Yair Aichenbaum
committed
Improved XAML layout for the File Control
1 parent 8215a2c commit b1a81c0

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

Files/GenericFileBrowser.xaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@
1515
NavigationCacheMode="Required"
1616
PointerReleased="GenericItemView_PointerReleased"
1717
mc:Ignorable="d">
18+
1819
<local:BaseLayout.Resources>
20+
1921
<MenuFlyout x:Key="BaseLayoutContextFlyout">
22+
2023
<MenuFlyoutSubItem x:Name="SortByEmptySpace" Text="Sort by">
2124
<MenuFlyoutSubItem.Icon>
2225
<FontIcon Glyph="&#xE8CB;" />
2326
</MenuFlyoutSubItem.Icon>
27+
2428
<muxc:RadioMenuFlyoutItem
2529
GroupName="SortGroup"
2630
IsChecked="{x:Bind AssociatedViewModel.IsSortedByName, Mode=TwoWay}"
@@ -47,6 +51,7 @@
4751
IsChecked="{x:Bind AssociatedViewModel.IsSortedDescending, Mode=TwoWay}"
4852
Text="Descending" />
4953
</MenuFlyoutSubItem>
54+
5055
<MenuFlyoutItem
5156
x:Name="RefreshEmptySpace"
5257
Click="{x:Bind local:NavigationActions.Refresh_Click}"
@@ -55,7 +60,9 @@
5560
<FontIcon Glyph="&#xE72C;" />
5661
</MenuFlyoutItem.Icon>
5762
</MenuFlyoutItem>
63+
5864
<MenuFlyoutSeparator />
65+
5966
<MenuFlyoutItem
6067
x:Name="PasteEmptySpace"
6168
Click="{x:Bind AssociatedInteractions.PasteItem_ClickAsync}"
@@ -65,7 +72,9 @@
6572
<FontIcon Glyph="&#xE77F;" />
6673
</MenuFlyoutItem.Icon>
6774
</MenuFlyoutItem>
75+
6876
<MenuFlyoutSeparator />
77+
6978
<MenuFlyoutItem
7079
x:Name="OpenTerminal"
7180
Click="{x:Bind AssociatedInteractions.OpenDirectoryInTerminal}"
@@ -75,11 +84,14 @@
7584
<FontIcon Glyph="&#xE756;" />
7685
</MenuFlyoutItem.Icon>
7786
</MenuFlyoutItem>
87+
7888
<MenuFlyoutSeparator />
89+
7990
<MenuFlyoutSubItem x:Name="NewEmptySpace" Text="New">
8091
<MenuFlyoutSubItem.Icon>
8192
<FontIcon Glyph="&#xE710;" />
8293
</MenuFlyoutSubItem.Icon>
94+
8395
<MenuFlyoutItem
8496
x:Name="NewFolder"
8597
Click="{x:Bind AssociatedInteractions.NewFolder_Click}"
@@ -88,7 +100,9 @@
88100
<FontIcon Glyph="&#xE8B7;" />
89101
</MenuFlyoutItem.Icon>
90102
</MenuFlyoutItem>
103+
91104
<MenuFlyoutSeparator />
105+
92106
<MenuFlyoutItem
93107
x:Name="NewBitmapImage"
94108
Click="{x:Bind AssociatedInteractions.NewBitmapImage_Click}"
@@ -97,6 +111,7 @@
97111
<FontIcon Glyph="&#xEB9F;" />
98112
</MenuFlyoutItem.Icon>
99113
</MenuFlyoutItem>
114+
100115
<MenuFlyoutItem
101116
x:Name="NewTextDocument"
102117
Click="{x:Bind AssociatedInteractions.NewTextDocument_Click}"
@@ -105,8 +120,11 @@
105120
<FontIcon Glyph="&#xE8A5;" />
106121
</MenuFlyoutItem.Icon>
107122
</MenuFlyoutItem>
123+
108124
</MenuFlyoutSubItem>
125+
109126
<MenuFlyoutSeparator />
127+
110128
<MenuFlyoutItem
111129
x:Name="PropertiesFolder"
112130
Click="{x:Bind AssociatedInteractions.ShowFolderPropertiesButton_Click}"
@@ -115,8 +133,10 @@
115133
<FontIcon Glyph="&#xE946;" />
116134
</MenuFlyoutItem.Icon>
117135
</MenuFlyoutItem>
136+
118137
</MenuFlyout>
119138

139+
120140
<MenuFlyout x:Key="BaseLayoutItemContextFlyout" Opening="RightClickContextMenu_Opening">
121141
<MenuFlyoutItem
122142
x:Name="UnzipItem"
@@ -128,6 +148,7 @@
128148
<FontIcon Glyph="&#xED25;" />
129149
</MenuFlyoutItem.Icon>
130150
</MenuFlyoutItem>
151+
131152
<MenuFlyoutItem
132153
x:Name="OpenItem"
133154
x:Load="False"
@@ -138,6 +159,7 @@
138159
<FontIcon Glyph="&#xE7AC;" />
139160
</MenuFlyoutItem.Icon>
140161
</MenuFlyoutItem>
162+
141163
<MenuFlyoutItem
142164
x:Name="OpenInNewTab"
143165
x:Load="False"
@@ -148,6 +170,7 @@
148170
<FontIcon Glyph="&#xE737;" />
149171
</MenuFlyoutItem.Icon>
150172
</MenuFlyoutItem>
173+
151174
<MenuFlyoutItem
152175
x:Name="OpenInNewWindowItem"
153176
x:Load="False"
@@ -158,6 +181,7 @@
158181
<FontIcon Glyph="&#xE8A7;" />
159182
</MenuFlyoutItem.Icon>
160183
</MenuFlyoutItem>
184+
161185
<MenuFlyoutItem
162186
x:Name="ShareItem"
163187
Click="{x:Bind AssociatedInteractions.ShareItem_Click}"
@@ -166,7 +190,9 @@
166190
<FontIcon Glyph="&#xE72D;" />
167191
</MenuFlyoutItem.Icon>
168192
</MenuFlyoutItem>
193+
169194
<MenuFlyoutSeparator />
195+
170196
<MenuFlyoutItem
171197
x:Name="CutItem"
172198
Click="{x:Bind AssociatedInteractions.CutItem_Click}"
@@ -175,6 +201,7 @@
175201
<FontIcon Glyph="&#xE8C6;" />
176202
</MenuFlyoutItem.Icon>
177203
</MenuFlyoutItem>
204+
178205
<MenuFlyoutItem
179206
x:Name="CopyItem"
180207
Click="{x:Bind AssociatedInteractions.CopyItem_ClickAsync}"
@@ -183,7 +210,9 @@
183210
<FontIcon Glyph="&#xE8C8;" />
184211
</MenuFlyoutItem.Icon>
185212
</MenuFlyoutItem>
213+
186214
<MenuFlyoutSeparator />
215+
187216
<MenuFlyoutItem
188217
x:Name="DeleteItem"
189218
Click="{x:Bind AssociatedInteractions.DeleteItem_Click}"
@@ -192,6 +221,7 @@
192221
<FontIcon Glyph="&#xE74D;" />
193222
</MenuFlyoutItem.Icon>
194223
</MenuFlyoutItem>
224+
195225
<MenuFlyoutItem
196226
x:Name="RenameItem"
197227
Click="{x:Bind AssociatedInteractions.RenameItem_Click}"
@@ -200,7 +230,9 @@
200230
<FontIcon Glyph="&#xE8AC;" />
201231
</MenuFlyoutItem.Icon>
202232
</MenuFlyoutItem>
233+
203234
<MenuFlyoutSeparator />
235+
204236
<MenuFlyoutItem
205237
x:Name="SidebarPinItem"
206238
x:Load="False"
@@ -211,6 +243,7 @@
211243
<SymbolIcon Symbol="Pin" />
212244
</MenuFlyoutItem.Icon>
213245
</MenuFlyoutItem>
246+
214247
<MenuFlyoutItem
215248
x:Name="PropertiesItem"
216249
Click="{x:Bind AssociatedInteractions.ShowPropertiesButton_Click}"
@@ -219,6 +252,7 @@
219252
<FontIcon Glyph="&#xE946;" />
220253
</MenuFlyoutItem.Icon>
221254
</MenuFlyoutItem>
255+
222256
<MenuFlyoutItem
223257
x:Name="QuickLook"
224258
Click="{x:Bind AssociatedInteractions.ToggleQuickLook_Click}"
@@ -228,8 +262,10 @@
228262
<BitmapIcon UriSource="ms-appx:///Assets/QuickLook/quicklook_icon_black.png" />
229263
</MenuFlyoutItem.Icon>
230264
</MenuFlyoutItem>
265+
231266
</MenuFlyout>
232267
</local:BaseLayout.Resources>
268+
233269
<Grid
234270
x:Name="RootGrid"
235271
Background="Transparent"
@@ -254,6 +290,7 @@
254290
Text="This folder is empty."
255291
TextWrapping="Wrap"
256292
Visibility="{x:Bind AssociatedViewModel.EmptyTextState.isVisible, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
293+
257294
<controls:DataGrid
258295
x:Name="AllView"
259296
Grid.Row="3"

Files/ProHome.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
</ResourceDictionary>
8787
</Page.Resources>
8888

89-
<Grid Padding="0,0,0,0">
89+
<Grid>
9090
<Grid.RowDefinitions>
9191
<RowDefinition Height="Auto" />
9292
<RowDefinition Height="*" />
@@ -128,6 +128,7 @@
128128
Navigated="ItemDisplayFrame_Navigated" />
129129

130130
</SplitView>
131+
131132
<FlyoutPresenter
132133
x:Name="ProgressFlyout"
133134
Grid.Row="1"
@@ -146,5 +147,6 @@
146147
<ProgressBar x:Name="ProgressFlyoutProgressBar" VerticalAlignment="Center" />
147148
</StackPanel>
148149
</FlyoutPresenter>
150+
149151
</Grid>
150152
</Page>

0 commit comments

Comments
 (0)