Skip to content

Commit 0bbcd35

Browse files
committed
Test
1 parent 4bfed3c commit 0bbcd35

File tree

2 files changed

+101
-23
lines changed

2 files changed

+101
-23
lines changed

src/Files.App/Views/Settings/AppearancePage.xaml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<DataTemplate x:Key="AppThemeResourcesItemTemplate" x:DataType="dataitem:AppThemeResourceItem">
2323
<Grid
2424
Width="120"
25+
AutomationProperties.AutomationControlType="Custom"
2526
AutomationProperties.Name="{x:Bind Name, Mode=OneWay}"
2627
BorderBrush="{ThemeResource ControlElevationBorderBrush}"
2728
BorderThickness="1"
@@ -101,6 +102,7 @@
101102
</wctcontrols:SettingsCard.HeaderIcon>
102103
<uc:ComboBoxEx
103104
x:Name="ThemeChooser"
105+
AutomationProperties.AutomationControlType="Custom"
104106
AutomationProperties.Name="{helpers:ResourceString Name=SettingsAppearanceTheme}"
105107
ItemsSource="{x:Bind ViewModel.Themes, Mode=OneWay}"
106108
SelectedIndex="{x:Bind ViewModel.SelectedThemeIndex, Mode=TwoWay}" />
@@ -112,6 +114,7 @@
112114
<FontIcon Glyph="&#xEF1F;" />
113115
</wctcontrols:SettingsCard.HeaderIcon>
114116
<uc:ComboBoxEx
117+
AutomationProperties.AutomationControlType="Custom"
115118
AutomationProperties.Name="{helpers:ResourceString Name=BackdropMaterial}"
116119
ItemsSource="{x:Bind ViewModel.BackdropMaterialTypes.Values}"
117120
SelectedItem="{x:Bind ViewModel.SelectedBackdropMaterial, Mode=TwoWay}" />
@@ -125,7 +128,10 @@
125128
<wctcontrols:SettingsExpander.HeaderIcon>
126129
<FontIcon Glyph="&#xE771;" />
127130
</wctcontrols:SettingsExpander.HeaderIcon>
128-
<Button Padding="0" AutomationProperties.Name="{helpers:ResourceString Name=BackgroundColor}">
131+
<Button
132+
Padding="0"
133+
AutomationProperties.AutomationControlType="Custom"
134+
AutomationProperties.Name="{helpers:ResourceString Name=BackgroundColor}">
129135
<StackPanel Orientation="Horizontal">
130136
<Border
131137
Width="24"
@@ -193,6 +199,7 @@
193199
<Slider
194200
Width="140"
195201
HorizontalAlignment="Right"
202+
AutomationProperties.AutomationControlType="Custom"
196203
AutomationProperties.Name="{helpers:ResourceString Name=Opacity}"
197204
IsThumbToolTipEnabled="False"
198205
Maximum="1"
@@ -205,6 +212,7 @@
205212
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ImageFit}">
206213
<uc:ComboBoxEx
207214
MinWidth="140"
215+
AutomationProperties.AutomationControlType="Custom"
208216
AutomationProperties.Name="{helpers:ResourceString Name=ImageFit}"
209217
ItemsSource="{x:Bind ViewModel.ImageStretchTypes.Values}"
210218
SelectedItem="{x:Bind ViewModel.SelectedImageStretchType, Mode=TwoWay}" />
@@ -214,6 +222,7 @@
214222
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=VerticalAlignment}">
215223
<uc:ComboBoxEx
216224
MinWidth="140"
225+
AutomationProperties.AutomationControlType="Custom"
217226
AutomationProperties.Name="{helpers:ResourceString Name=VerticalAlignment}"
218227
ItemsSource="{x:Bind ViewModel.ImageVerticalAlignmentTypes.Values}"
219228
SelectedItem="{x:Bind ViewModel.SelectedImageVerticalAlignmentType, Mode=TwoWay}" />
@@ -223,6 +232,7 @@
223232
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=HorizontalAlignment}">
224233
<uc:ComboBoxEx
225234
MinWidth="140"
235+
AutomationProperties.AutomationControlType="Custom"
226236
AutomationProperties.Name="{helpers:ResourceString Name=HorizontalAlignment}"
227237
ItemsSource="{x:Bind ViewModel.ImageHorizontalAlignmentTypes.Values}"
228238
SelectedItem="{x:Bind ViewModel.SelectedImageHorizontalAlignmentType, Mode=TwoWay}" />
@@ -262,12 +272,18 @@
262272
x:Name="ShowShelfPaneSetting"
263273
Header="{helpers:ResourceString Name=ShowShelfPaneButtonInAddressBar}"
264274
Visibility="{x:Bind ViewModel.IsAppEnvironmentDev, Mode=OneTime}">
265-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowShelfPaneButtonInAddressBar}" IsOn="{x:Bind ViewModel.ShowShelfPaneToggleButton, Mode=TwoWay}" />
275+
<ToggleSwitch
276+
AutomationProperties.AutomationControlType="Custom"
277+
AutomationProperties.Name="{helpers:ResourceString Name=ShowShelfPaneButtonInAddressBar}"
278+
IsOn="{x:Bind ViewModel.ShowShelfPaneToggleButton, Mode=TwoWay}" />
266279
</wctcontrols:SettingsCard>
267280

268281
<!-- Show toolbar -->
269282
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowToolbar}">
270-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowToolbar}" IsOn="{x:Bind ViewModel.ShowToolbar, Mode=TwoWay}" />
283+
<ToggleSwitch
284+
AutomationProperties.AutomationControlType="Custom"
285+
AutomationProperties.Name="{helpers:ResourceString Name=ShowToolbar}"
286+
IsOn="{x:Bind ViewModel.ShowToolbar, Mode=TwoWay}" />
271287
</wctcontrols:SettingsCard>
272288
</wctcontrols:SettingsExpander.Items>
273289
</wctcontrols:SettingsExpander>

src/Files.App/Views/Settings/GeneralPage.xaml

Lines changed: 82 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
<uc:ComboBoxEx
3939
x:Name="AppLanguagesComboBox"
4040
HorizontalAlignment="Left"
41+
AutomationProperties.AutomationControlType="Custom"
4142
AutomationProperties.Name="{helpers:ResourceString Name=Language}"
4243
ItemsSource="{x:Bind ViewModel.AppLanguages}"
4344
SelectedIndex="{x:Bind ViewModel.SelectedAppLanguageIndex, Mode=TwoWay}">
@@ -60,6 +61,7 @@
6061
<uc:ComboBoxEx
6162
x:Name="DateFormatChooser"
6263
Grid.Column="1"
64+
AutomationProperties.AutomationControlType="Custom"
6365
AutomationProperties.Name="{helpers:ResourceString Name=DateFormat}"
6466
ItemsSource="{x:Bind ViewModel.DateFormats}"
6567
SelectedIndex="{x:Bind ViewModel.SelectedDateTimeFormatIndex, Mode=TwoWay}">
@@ -88,7 +90,10 @@
8890
<wctcontrols:SettingsExpander.HeaderIcon>
8991
<FontIcon Glyph="&#xE7E8;" />
9092
</wctcontrols:SettingsExpander.HeaderIcon>
91-
<uc:ComboBoxEx AutomationProperties.Name="{helpers:ResourceString Name=StartupSettings}" SelectedIndex="{x:Bind ViewModel.SelectedStartupSettingIndex, Mode=OneWay}">
93+
<uc:ComboBoxEx
94+
AutomationProperties.AutomationControlType="Custom"
95+
AutomationProperties.Name="{helpers:ResourceString Name=StartupSettings}"
96+
SelectedIndex="{x:Bind ViewModel.SelectedStartupSettingIndex, Mode=OneWay}">
9297
<ComboBoxItem Content="{helpers:ResourceString Name=SettingsOnStartupOpenANewTab/Content}" IsSelected="{x:Bind ViewModel.OpenNewTabPageOnStartup, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
9398

9499
<ComboBoxItem Content="{helpers:ResourceString Name=SettingsOnStartupContinueWhereYouLeftOff/Content}" IsSelected="{x:Bind ViewModel.ContinueLastSessionOnStartUp, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
@@ -158,6 +163,7 @@
158163
ToolTipService.ToolTip="{x:Bind Text}" />
159164
<Button
160165
HorizontalAlignment="Right"
166+
AutomationProperties.AutomationControlType="Custom"
161167
AutomationProperties.Name="{helpers:ResourceString Name=Remove}"
162168
Click="RemoveStartupPage"
163169
ToolTipService.ToolTip="{helpers:ResourceString Name=Remove}">
@@ -170,7 +176,10 @@
170176
</Grid>
171177

172178
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=OpenTabInExistingInstance}">
173-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=OpenTabInExistingInstance}" IsOn="{x:Bind ViewModel.OpenTabInExistingInstance, Mode=TwoWay}" />
179+
<ToggleSwitch
180+
AutomationProperties.AutomationControlType="Custom"
181+
AutomationProperties.Name="{helpers:ResourceString Name=OpenTabInExistingInstance}"
182+
IsOn="{x:Bind ViewModel.OpenTabInExistingInstance, Mode=TwoWay}" />
174183
</wctcontrols:SettingsCard>
175184
</wctcontrols:SettingsExpander.Items>
176185
</wctcontrols:SettingsExpander>
@@ -180,10 +189,14 @@
180189
<wctcontrols:SettingsExpander.HeaderIcon>
181190
<FontIcon Glyph="&#xE89F;" />
182191
</wctcontrols:SettingsExpander.HeaderIcon>
183-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=SettingsMultitaskingAlwaysOpenDualPane}" IsOn="{x:Bind ViewModel.AlwaysOpenDualPaneInNewTab, Mode=TwoWay}" />
192+
<ToggleSwitch
193+
AutomationProperties.AutomationControlType="Custom"
194+
AutomationProperties.Name="{helpers:ResourceString Name=SettingsMultitaskingAlwaysOpenDualPane}"
195+
IsOn="{x:Bind ViewModel.AlwaysOpenDualPaneInNewTab, Mode=TwoWay}" />
184196
<wctcontrols:SettingsExpander.Items>
185197
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=DefaultPaneArrangement}">
186198
<uc:ComboBoxEx
199+
AutomationProperties.AutomationControlType="Custom"
187200
AutomationProperties.Name="{helpers:ResourceString Name=DefaultPaneArrangement}"
188201
ItemsSource="{x:Bind ViewModel.ShellPaneArrangementTypes.Values}"
189202
SelectedItem="{x:Bind ViewModel.SelectedShellPaneArrangementType, Mode=TwoWay}" />
@@ -198,6 +211,7 @@
198211
</wctcontrols:SettingsCard.HeaderIcon>
199212
<ToggleSwitch
200213
x:Name="AlwaysSwitchToNewlyOpenedTab"
214+
AutomationProperties.AutomationControlType="Custom"
201215
AutomationProperties.Name="{helpers:ResourceString Name=AlwaysSwitchToNewlyOpenedTab}"
202216
IsOn="{x:Bind ViewModel.AlwaysSwitchToNewlyOpenedTab, Mode=TwoWay}" />
203217
</wctcontrols:SettingsCard>
@@ -209,23 +223,38 @@
209223
</wctcontrols:SettingsExpander.HeaderIcon>
210224
<wctcontrols:SettingsExpander.Items>
211225
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=QuickAccess}">
212-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=QuickAccess}" IsOn="{x:Bind ViewModel.ShowQuickAccessWidget, Mode=TwoWay}" />
226+
<ToggleSwitch
227+
AutomationProperties.AutomationControlType="Custom"
228+
AutomationProperties.Name="{helpers:ResourceString Name=QuickAccess}"
229+
IsOn="{x:Bind ViewModel.ShowQuickAccessWidget, Mode=TwoWay}" />
213230
</wctcontrols:SettingsCard>
214231

215232
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=Drives}">
216-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=Drives}" IsOn="{x:Bind ViewModel.ShowDrivesWidget, Mode=TwoWay}" />
233+
<ToggleSwitch
234+
AutomationProperties.AutomationControlType="Custom"
235+
AutomationProperties.Name="{helpers:ResourceString Name=Drives}"
236+
IsOn="{x:Bind ViewModel.ShowDrivesWidget, Mode=TwoWay}" />
217237
</wctcontrols:SettingsCard>
218238

219239
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=NetworkLocations}">
220-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=NetworkLocations}" IsOn="{x:Bind ViewModel.ShowNetworkLocationsWidget, Mode=TwoWay}" />
240+
<ToggleSwitch
241+
AutomationProperties.AutomationControlType="Custom"
242+
AutomationProperties.Name="{helpers:ResourceString Name=NetworkLocations}"
243+
IsOn="{x:Bind ViewModel.ShowNetworkLocationsWidget, Mode=TwoWay}" />
221244
</wctcontrols:SettingsCard>
222245

223246
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=FileTags}">
224-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=FileTags}" IsOn="{x:Bind ViewModel.ShowFileTagsWidget, Mode=TwoWay}" />
247+
<ToggleSwitch
248+
AutomationProperties.AutomationControlType="Custom"
249+
AutomationProperties.Name="{helpers:ResourceString Name=FileTags}"
250+
IsOn="{x:Bind ViewModel.ShowFileTagsWidget, Mode=TwoWay}" />
225251
</wctcontrols:SettingsCard>
226252

227253
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=RecentFiles}">
228-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=RecentFiles}" IsOn="{x:Bind ViewModel.ShowRecentFilesWidget, Mode=TwoWay}" />
254+
<ToggleSwitch
255+
AutomationProperties.AutomationControlType="Custom"
256+
AutomationProperties.Name="{helpers:ResourceString Name=RecentFiles}"
257+
IsOn="{x:Bind ViewModel.ShowRecentFilesWidget, Mode=TwoWay}" />
229258
</wctcontrols:SettingsCard>
230259
</wctcontrols:SettingsExpander.Items>
231260
</wctcontrols:SettingsExpander>
@@ -246,61 +275,91 @@
246275
<wctcontrols:SettingsExpander.Items>
247276
<!-- Open in new tab -->
248277
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowOpenInNewTab}">
249-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowOpenInNewTab}" IsOn="{x:Bind ViewModel.ShowOpenInNewTab, Mode=TwoWay}" />
278+
<ToggleSwitch
279+
AutomationProperties.AutomationControlType="Custom"
280+
AutomationProperties.Name="{helpers:ResourceString Name=ShowOpenInNewTab}"
281+
IsOn="{x:Bind ViewModel.ShowOpenInNewTab, Mode=TwoWay}" />
250282
</wctcontrols:SettingsCard>
251283

252284
<!-- Open in new window -->
253285
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowOpenInNewWindow}">
254-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowOpenInNewWindow}" IsOn="{x:Bind ViewModel.ShowOpenInNewWindow, Mode=TwoWay}" />
286+
<ToggleSwitch
287+
AutomationProperties.AutomationControlType="Custom"
288+
AutomationProperties.Name="{helpers:ResourceString Name=ShowOpenInNewWindow}"
289+
IsOn="{x:Bind ViewModel.ShowOpenInNewWindow, Mode=TwoWay}" />
255290
</wctcontrols:SettingsCard>
256291

257292
<!-- Open in new pane -->
258293
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowOpenInNewPane}">
259-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowOpenInNewPane}" IsOn="{x:Bind ViewModel.ShowOpenInNewPane, Mode=TwoWay}" />
294+
<ToggleSwitch
295+
AutomationProperties.AutomationControlType="Custom"
296+
AutomationProperties.Name="{helpers:ResourceString Name=ShowOpenInNewPane}"
297+
IsOn="{x:Bind ViewModel.ShowOpenInNewPane, Mode=TwoWay}" />
260298
</wctcontrols:SettingsCard>
261299

262300
<!-- Copy path -->
263301
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowCopyPath}">
264-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowCopyPath}" IsOn="{x:Bind ViewModel.ShowCopyPath, Mode=TwoWay}" />
302+
<ToggleSwitch
303+
AutomationProperties.AutomationControlType="Custom"
304+
AutomationProperties.Name="{helpers:ResourceString Name=ShowCopyPath}"
305+
IsOn="{x:Bind ViewModel.ShowCopyPath, Mode=TwoWay}" />
265306
</wctcontrols:SettingsCard>
266307

267308
<!-- Create folder with selection -->
268309
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowCreateFolderWithSelection}">
269-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowCreateFolderWithSelection}" IsOn="{x:Bind ViewModel.ShowCreateFolderWithSelection, Mode=TwoWay}" />
310+
<ToggleSwitch
311+
AutomationProperties.AutomationControlType="Custom"
312+
AutomationProperties.Name="{helpers:ResourceString Name=ShowCreateFolderWithSelection}"
313+
IsOn="{x:Bind ViewModel.ShowCreateFolderWithSelection, Mode=TwoWay}" />
270314
</wctcontrols:SettingsCard>
271315

272316
<!-- Create alternate data stream -->
273317
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowCreateAlternateDataStream}">
274-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowCreateAlternateDataStream}" IsOn="{x:Bind ViewModel.ShowCreateAlternateDataStream, Mode=TwoWay}" />
318+
<ToggleSwitch
319+
AutomationProperties.AutomationControlType="Custom"
320+
AutomationProperties.Name="{helpers:ResourceString Name=ShowCreateAlternateDataStream}"
321+
IsOn="{x:Bind ViewModel.ShowCreateAlternateDataStream, Mode=TwoWay}" />
275322
</wctcontrols:SettingsCard>
276323

277324
<!-- Create shortcut -->
278325
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowCreateShortcut}">
279-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowCreateShortcut}" IsOn="{x:Bind ViewModel.ShowCreateShortcut, Mode=TwoWay}" />
326+
<ToggleSwitch
327+
AutomationProperties.AutomationControlType="Custom"
328+
AutomationProperties.Name="{helpers:ResourceString Name=ShowCreateShortcut}"
329+
IsOn="{x:Bind ViewModel.ShowCreateShortcut, Mode=TwoWay}" />
280330
</wctcontrols:SettingsCard>
281331

282332
<!-- Compression options -->
283333
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowCompressionOptions}">
284-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowCompressionOptions}" IsOn="{x:Bind ViewModel.ShowCompressionOptions, Mode=TwoWay}" />
334+
<ToggleSwitch
335+
AutomationProperties.AutomationControlType="Custom"
336+
AutomationProperties.Name="{helpers:ResourceString Name=ShowCompressionOptions}"
337+
IsOn="{x:Bind ViewModel.ShowCompressionOptions, Mode=TwoWay}" />
285338
</wctcontrols:SettingsCard>
286339

287340
<!-- Flatten options -->
288341
<!-- TODO uncomment code when feature is marked as stable -->
289342
<!--<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowFlattenOptions}">
290343
<ToggleSwitch
291-
AutomationProperties.Name="{helpers:ResourceString Name=ShowFlattenOptions}"
344+
AutomationProperties.AutomationControlType="Custom" AutomationProperties.Name="{helpers:ResourceString Name=ShowFlattenOptions}"
292345
IsOn="{x:Bind ViewModel.ShowFlattenOptions, Mode=TwoWay}"
293346
/>
294347
</wctcontrols:SettingsCard>-->
295348

296349
<!-- Send To -->
297350
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowSendToMenu}">
298-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowSendToMenu}" IsOn="{x:Bind ViewModel.ShowSendToMenu, Mode=TwoWay}" />
351+
<ToggleSwitch
352+
AutomationProperties.AutomationControlType="Custom"
353+
AutomationProperties.Name="{helpers:ResourceString Name=ShowSendToMenu}"
354+
IsOn="{x:Bind ViewModel.ShowSendToMenu, Mode=TwoWay}" />
299355
</wctcontrols:SettingsCard>
300356

301357
<!-- Edit tags -->
302358
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowEditTagsMenu}">
303-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowEditTagsMenu}" IsOn="{x:Bind ViewModel.ShowEditTagsMenu, Mode=TwoWay}" />
359+
<ToggleSwitch
360+
AutomationProperties.AutomationControlType="Custom"
361+
AutomationProperties.Name="{helpers:ResourceString Name=ShowEditTagsMenu}"
362+
IsOn="{x:Bind ViewModel.ShowEditTagsMenu, Mode=TwoWay}" />
304363
</wctcontrols:SettingsCard>
305364
</wctcontrols:SettingsExpander.Items>
306365
</wctcontrols:SettingsExpander>
@@ -311,7 +370,10 @@
311370
<wctcontrols:SettingsCard.HeaderIcon>
312371
<FontIcon Glyph="&#xE712;" />
313372
</wctcontrols:SettingsCard.HeaderIcon>
314-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=SettingsContextMenuOverflow}" IsOn="{x:Bind ViewModel.MoveShellExtensionsToSubMenu, Mode=TwoWay}" />
373+
<ToggleSwitch
374+
AutomationProperties.AutomationControlType="Custom"
375+
AutomationProperties.Name="{helpers:ResourceString Name=SettingsContextMenuOverflow}"
376+
IsOn="{x:Bind ViewModel.MoveShellExtensionsToSubMenu, Mode=TwoWay}" />
315377
</wctcontrols:SettingsCard>
316378
</StackPanel>
317379

0 commit comments

Comments
 (0)