Skip to content

Commit 60df976

Browse files
committed
Test
1 parent 4bfed3c commit 60df976

File tree

2 files changed

+91
-29
lines changed

2 files changed

+91
-29
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
</wctcontrols:SettingsCard.HeaderIcon>
102102
<uc:ComboBoxEx
103103
x:Name="ThemeChooser"
104-
AutomationProperties.Name="{helpers:ResourceString Name=SettingsAppearanceTheme}"
104+
AutomationProperties.AutomationControlType="Custom"
105105
ItemsSource="{x:Bind ViewModel.Themes, Mode=OneWay}"
106106
SelectedIndex="{x:Bind ViewModel.SelectedThemeIndex, Mode=TwoWay}" />
107107
</wctcontrols:SettingsCard>
@@ -112,7 +112,7 @@
112112
<FontIcon Glyph="&#xEF1F;" />
113113
</wctcontrols:SettingsCard.HeaderIcon>
114114
<uc:ComboBoxEx
115-
AutomationProperties.Name="{helpers:ResourceString Name=BackdropMaterial}"
115+
AutomationProperties.AutomationControlType="Custom"
116116
ItemsSource="{x:Bind ViewModel.BackdropMaterialTypes.Values}"
117117
SelectedItem="{x:Bind ViewModel.SelectedBackdropMaterial, Mode=TwoWay}" />
118118
</wctcontrols:SettingsCard>
@@ -125,7 +125,7 @@
125125
<wctcontrols:SettingsExpander.HeaderIcon>
126126
<FontIcon Glyph="&#xE771;" />
127127
</wctcontrols:SettingsExpander.HeaderIcon>
128-
<Button Padding="0" AutomationProperties.Name="{helpers:ResourceString Name=BackgroundColor}">
128+
<Button Padding="0" AutomationProperties.AutomationControlType="Custom">
129129
<StackPanel Orientation="Horizontal">
130130
<Border
131131
Width="24"
@@ -193,7 +193,7 @@
193193
<Slider
194194
Width="140"
195195
HorizontalAlignment="Right"
196-
AutomationProperties.Name="{helpers:ResourceString Name=Opacity}"
196+
AutomationProperties.AutomationControlType="Custom"
197197
IsThumbToolTipEnabled="False"
198198
Maximum="1"
199199
Minimum=".1"
@@ -205,7 +205,7 @@
205205
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ImageFit}">
206206
<uc:ComboBoxEx
207207
MinWidth="140"
208-
AutomationProperties.Name="{helpers:ResourceString Name=ImageFit}"
208+
AutomationProperties.AutomationControlType="Custom"
209209
ItemsSource="{x:Bind ViewModel.ImageStretchTypes.Values}"
210210
SelectedItem="{x:Bind ViewModel.SelectedImageStretchType, Mode=TwoWay}" />
211211
</wctcontrols:SettingsCard>
@@ -214,7 +214,7 @@
214214
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=VerticalAlignment}">
215215
<uc:ComboBoxEx
216216
MinWidth="140"
217-
AutomationProperties.Name="{helpers:ResourceString Name=VerticalAlignment}"
217+
AutomationProperties.AutomationControlType="Custom"
218218
ItemsSource="{x:Bind ViewModel.ImageVerticalAlignmentTypes.Values}"
219219
SelectedItem="{x:Bind ViewModel.SelectedImageVerticalAlignmentType, Mode=TwoWay}" />
220220
</wctcontrols:SettingsCard>
@@ -223,7 +223,7 @@
223223
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=HorizontalAlignment}">
224224
<uc:ComboBoxEx
225225
MinWidth="140"
226-
AutomationProperties.Name="{helpers:ResourceString Name=HorizontalAlignment}"
226+
AutomationProperties.AutomationControlType="Custom"
227227
ItemsSource="{x:Bind ViewModel.ImageHorizontalAlignmentTypes.Values}"
228228
SelectedItem="{x:Bind ViewModel.SelectedImageHorizontalAlignmentType, Mode=TwoWay}" />
229229
</wctcontrols:SettingsCard>
@@ -262,12 +262,12 @@
262262
x:Name="ShowShelfPaneSetting"
263263
Header="{helpers:ResourceString Name=ShowShelfPaneButtonInAddressBar}"
264264
Visibility="{x:Bind ViewModel.IsAppEnvironmentDev, Mode=OneTime}">
265-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowShelfPaneButtonInAddressBar}" IsOn="{x:Bind ViewModel.ShowShelfPaneToggleButton, Mode=TwoWay}" />
265+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowShelfPaneToggleButton, Mode=TwoWay}" />
266266
</wctcontrols:SettingsCard>
267267

268268
<!-- Show toolbar -->
269269
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowToolbar}">
270-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowToolbar}" IsOn="{x:Bind ViewModel.ShowToolbar, Mode=TwoWay}" />
270+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowToolbar, Mode=TwoWay}" />
271271
</wctcontrols:SettingsCard>
272272
</wctcontrols:SettingsExpander.Items>
273273
</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)