Skip to content

Commit 8564abb

Browse files
committed
Test
1 parent 4bfed3c commit 8564abb

File tree

2 files changed

+33
-34
lines changed

2 files changed

+33
-34
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: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<uc:ComboBoxEx
3939
x:Name="AppLanguagesComboBox"
4040
HorizontalAlignment="Left"
41-
AutomationProperties.Name="{helpers:ResourceString Name=Language}"
41+
AutomationProperties.AutomationControlType="Custom"
4242
ItemsSource="{x:Bind ViewModel.AppLanguages}"
4343
SelectedIndex="{x:Bind ViewModel.SelectedAppLanguageIndex, Mode=TwoWay}">
4444
<uc:ComboBoxEx.ItemTemplate>
@@ -60,7 +60,7 @@
6060
<uc:ComboBoxEx
6161
x:Name="DateFormatChooser"
6262
Grid.Column="1"
63-
AutomationProperties.Name="{helpers:ResourceString Name=DateFormat}"
63+
AutomationProperties.AutomationControlType="Custom"
6464
ItemsSource="{x:Bind ViewModel.DateFormats}"
6565
SelectedIndex="{x:Bind ViewModel.SelectedDateTimeFormatIndex, Mode=TwoWay}">
6666
<uc:ComboBoxEx.ItemTemplate>
@@ -88,7 +88,7 @@
8888
<wctcontrols:SettingsExpander.HeaderIcon>
8989
<FontIcon Glyph="&#xE7E8;" />
9090
</wctcontrols:SettingsExpander.HeaderIcon>
91-
<uc:ComboBoxEx AutomationProperties.Name="{helpers:ResourceString Name=StartupSettings}" SelectedIndex="{x:Bind ViewModel.SelectedStartupSettingIndex, Mode=OneWay}">
91+
<uc:ComboBoxEx AutomationProperties.AutomationControlType="Custom" SelectedIndex="{x:Bind ViewModel.SelectedStartupSettingIndex, Mode=OneWay}">
9292
<ComboBoxItem Content="{helpers:ResourceString Name=SettingsOnStartupOpenANewTab/Content}" IsSelected="{x:Bind ViewModel.OpenNewTabPageOnStartup, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
9393

9494
<ComboBoxItem Content="{helpers:ResourceString Name=SettingsOnStartupContinueWhereYouLeftOff/Content}" IsSelected="{x:Bind ViewModel.ContinueLastSessionOnStartUp, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
@@ -158,7 +158,6 @@
158158
ToolTipService.ToolTip="{x:Bind Text}" />
159159
<Button
160160
HorizontalAlignment="Right"
161-
AutomationProperties.Name="{helpers:ResourceString Name=Remove}"
162161
Click="RemoveStartupPage"
163162
ToolTipService.ToolTip="{helpers:ResourceString Name=Remove}">
164163
<FontIcon FontSize="16" Glyph="&#xE74D;" />
@@ -170,7 +169,7 @@
170169
</Grid>
171170

172171
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=OpenTabInExistingInstance}">
173-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=OpenTabInExistingInstance}" IsOn="{x:Bind ViewModel.OpenTabInExistingInstance, Mode=TwoWay}" />
172+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.OpenTabInExistingInstance, Mode=TwoWay}" />
174173
</wctcontrols:SettingsCard>
175174
</wctcontrols:SettingsExpander.Items>
176175
</wctcontrols:SettingsExpander>
@@ -180,11 +179,11 @@
180179
<wctcontrols:SettingsExpander.HeaderIcon>
181180
<FontIcon Glyph="&#xE89F;" />
182181
</wctcontrols:SettingsExpander.HeaderIcon>
183-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=SettingsMultitaskingAlwaysOpenDualPane}" IsOn="{x:Bind ViewModel.AlwaysOpenDualPaneInNewTab, Mode=TwoWay}" />
182+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.AlwaysOpenDualPaneInNewTab, Mode=TwoWay}" />
184183
<wctcontrols:SettingsExpander.Items>
185184
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=DefaultPaneArrangement}">
186185
<uc:ComboBoxEx
187-
AutomationProperties.Name="{helpers:ResourceString Name=DefaultPaneArrangement}"
186+
AutomationProperties.AutomationControlType="Custom"
188187
ItemsSource="{x:Bind ViewModel.ShellPaneArrangementTypes.Values}"
189188
SelectedItem="{x:Bind ViewModel.SelectedShellPaneArrangementType, Mode=TwoWay}" />
190189
</wctcontrols:SettingsCard>
@@ -198,7 +197,7 @@
198197
</wctcontrols:SettingsCard.HeaderIcon>
199198
<ToggleSwitch
200199
x:Name="AlwaysSwitchToNewlyOpenedTab"
201-
AutomationProperties.Name="{helpers:ResourceString Name=AlwaysSwitchToNewlyOpenedTab}"
200+
AutomationProperties.AutomationControlType="Custom"
202201
IsOn="{x:Bind ViewModel.AlwaysSwitchToNewlyOpenedTab, Mode=TwoWay}" />
203202
</wctcontrols:SettingsCard>
204203

@@ -209,23 +208,23 @@
209208
</wctcontrols:SettingsExpander.HeaderIcon>
210209
<wctcontrols:SettingsExpander.Items>
211210
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=QuickAccess}">
212-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=QuickAccess}" IsOn="{x:Bind ViewModel.ShowQuickAccessWidget, Mode=TwoWay}" />
211+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowQuickAccessWidget, Mode=TwoWay}" />
213212
</wctcontrols:SettingsCard>
214213

215214
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=Drives}">
216-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=Drives}" IsOn="{x:Bind ViewModel.ShowDrivesWidget, Mode=TwoWay}" />
215+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowDrivesWidget, Mode=TwoWay}" />
217216
</wctcontrols:SettingsCard>
218217

219218
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=NetworkLocations}">
220-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=NetworkLocations}" IsOn="{x:Bind ViewModel.ShowNetworkLocationsWidget, Mode=TwoWay}" />
219+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowNetworkLocationsWidget, Mode=TwoWay}" />
221220
</wctcontrols:SettingsCard>
222221

223222
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=FileTags}">
224-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=FileTags}" IsOn="{x:Bind ViewModel.ShowFileTagsWidget, Mode=TwoWay}" />
223+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowFileTagsWidget, Mode=TwoWay}" />
225224
</wctcontrols:SettingsCard>
226225

227226
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=RecentFiles}">
228-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=RecentFiles}" IsOn="{x:Bind ViewModel.ShowRecentFilesWidget, Mode=TwoWay}" />
227+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowRecentFilesWidget, Mode=TwoWay}" />
229228
</wctcontrols:SettingsCard>
230229
</wctcontrols:SettingsExpander.Items>
231230
</wctcontrols:SettingsExpander>
@@ -246,61 +245,61 @@
246245
<wctcontrols:SettingsExpander.Items>
247246
<!-- Open in new tab -->
248247
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowOpenInNewTab}">
249-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowOpenInNewTab}" IsOn="{x:Bind ViewModel.ShowOpenInNewTab, Mode=TwoWay}" />
248+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowOpenInNewTab, Mode=TwoWay}" />
250249
</wctcontrols:SettingsCard>
251250

252251
<!-- Open in new window -->
253252
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowOpenInNewWindow}">
254-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowOpenInNewWindow}" IsOn="{x:Bind ViewModel.ShowOpenInNewWindow, Mode=TwoWay}" />
253+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowOpenInNewWindow, Mode=TwoWay}" />
255254
</wctcontrols:SettingsCard>
256255

257256
<!-- Open in new pane -->
258257
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowOpenInNewPane}">
259-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowOpenInNewPane}" IsOn="{x:Bind ViewModel.ShowOpenInNewPane, Mode=TwoWay}" />
258+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowOpenInNewPane, Mode=TwoWay}" />
260259
</wctcontrols:SettingsCard>
261260

262261
<!-- Copy path -->
263262
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowCopyPath}">
264-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowCopyPath}" IsOn="{x:Bind ViewModel.ShowCopyPath, Mode=TwoWay}" />
263+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowCopyPath, Mode=TwoWay}" />
265264
</wctcontrols:SettingsCard>
266265

267266
<!-- Create folder with selection -->
268267
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowCreateFolderWithSelection}">
269-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowCreateFolderWithSelection}" IsOn="{x:Bind ViewModel.ShowCreateFolderWithSelection, Mode=TwoWay}" />
268+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowCreateFolderWithSelection, Mode=TwoWay}" />
270269
</wctcontrols:SettingsCard>
271270

272271
<!-- Create alternate data stream -->
273272
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowCreateAlternateDataStream}">
274-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowCreateAlternateDataStream}" IsOn="{x:Bind ViewModel.ShowCreateAlternateDataStream, Mode=TwoWay}" />
273+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowCreateAlternateDataStream, Mode=TwoWay}" />
275274
</wctcontrols:SettingsCard>
276275

277276
<!-- Create shortcut -->
278277
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowCreateShortcut}">
279-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowCreateShortcut}" IsOn="{x:Bind ViewModel.ShowCreateShortcut, Mode=TwoWay}" />
278+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowCreateShortcut, Mode=TwoWay}" />
280279
</wctcontrols:SettingsCard>
281280

282281
<!-- Compression options -->
283282
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowCompressionOptions}">
284-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowCompressionOptions}" IsOn="{x:Bind ViewModel.ShowCompressionOptions, Mode=TwoWay}" />
283+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowCompressionOptions, Mode=TwoWay}" />
285284
</wctcontrols:SettingsCard>
286285

287286
<!-- Flatten options -->
288287
<!-- TODO uncomment code when feature is marked as stable -->
289288
<!--<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowFlattenOptions}">
290289
<ToggleSwitch
291-
AutomationProperties.Name="{helpers:ResourceString Name=ShowFlattenOptions}"
290+
AutomationProperties.AutomationControlType="Custom"
292291
IsOn="{x:Bind ViewModel.ShowFlattenOptions, Mode=TwoWay}"
293292
/>
294293
</wctcontrols:SettingsCard>-->
295294

296295
<!-- Send To -->
297296
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowSendToMenu}">
298-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowSendToMenu}" IsOn="{x:Bind ViewModel.ShowSendToMenu, Mode=TwoWay}" />
297+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowSendToMenu, Mode=TwoWay}" />
299298
</wctcontrols:SettingsCard>
300299

301300
<!-- Edit tags -->
302301
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowEditTagsMenu}">
303-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowEditTagsMenu}" IsOn="{x:Bind ViewModel.ShowEditTagsMenu, Mode=TwoWay}" />
302+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.ShowEditTagsMenu, Mode=TwoWay}" />
304303
</wctcontrols:SettingsCard>
305304
</wctcontrols:SettingsExpander.Items>
306305
</wctcontrols:SettingsExpander>
@@ -311,7 +310,7 @@
311310
<wctcontrols:SettingsCard.HeaderIcon>
312311
<FontIcon Glyph="&#xE712;" />
313312
</wctcontrols:SettingsCard.HeaderIcon>
314-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=SettingsContextMenuOverflow}" IsOn="{x:Bind ViewModel.MoveShellExtensionsToSubMenu, Mode=TwoWay}" />
313+
<ToggleSwitch AutomationProperties.AutomationControlType="Custom" IsOn="{x:Bind ViewModel.MoveShellExtensionsToSubMenu, Mode=TwoWay}" />
315314
</wctcontrols:SettingsCard>
316315
</StackPanel>
317316

0 commit comments

Comments
 (0)