mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
Fix accessibility: Associate controls with labels for screen readers (#42439)
## Problem
Input controls (ComboBoxes, ToggleSwitches, NumberBoxes) within
SettingsCards throughout the PowerToys Settings UI were not
programmatically associated with their visible labels. This caused
screen readers to announce only the control type (e.g., "combo box",
"toggle switch") without any context about the control's purpose, making
the settings inaccessible to screen reader users.
This violates WCAG 2.2 Success Criterion 1.3.1 (Info and Relationships)
- Level A requirement.
**User Impact**: Screen reader users navigating PowerToys settings would
hear only "edit text" or "combo box" with no description, making it
difficult or impossible to configure settings independently.
## Solution
Added `AutomationProperties.Name` bindings to controls, linking them to
their parent SettingsCard's `Header` property. This establishes the
programmatic relationship between labels and controls required by
assistive technologies.
### Pattern Applied
For controls inside SettingsCards with a `Name` attribute:
```xaml
<tkcontrols:SettingsCard Name="LanguageHeader" x:Uid="LanguageHeader">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
AutomationProperties.Name="{Binding ElementName=LanguageHeader, Path=Header}"
DisplayMemberPath="Language"
ItemsSource="{Binding Languages, Mode=TwoWay}"
SelectedIndex="{Binding LanguagesIndex, Mode=TwoWay}" />
</tkcontrols:SettingsCard>
```
For data templates where headers are data-bound:
```xaml
<DataTemplate x:Key="ComboBoxTemplate" x:DataType="viewModels:PluginAdditionalOptionViewModel">
<tkcontrols:SettingsCard Header="{x:Bind Path=DisplayLabel}">
<ComboBox
AutomationProperties.Name="{x:Bind Path=DisplayLabel}"
ItemsSource="{x:Bind Path=ComboBoxItems}" />
</tkcontrols:SettingsCard>
</DataTemplate>
```
## Changes Made
### GeneralPage.xaml (7 controls)
- Language selection ComboBox
- Color mode/theme ComboBox
- Run at startup ToggleSwitch
- Show system tray icon ToggleSwitch
- Enable experimentation ToggleSwitch
- Enable data diagnostics ToggleSwitch
- Enable view diagnostic data ToggleSwitch
### PowerLauncherPage.xaml (4 data templates)
- ComboBoxTemplate - for plugin settings
- NumberBoxTemplate - for plugin numeric settings
- CheckBoxComboBoxTemplate - for conditional ComboBox settings
- CheckBoxNumberBoxTemplate - for conditional NumberBox settings
### PowerRenamePage.xaml (6 controls)
- Enable PowerRename ToggleSwitch
- Context menu mode ComboBox
- Enable auto-complete ToggleSwitch
- Max display list number NumberBox
- Restore flags on launch ToggleSwitch
- Use Boost library ToggleSwitch
### NewPlusPage.xaml (4 controls)
- Enable New+ ToggleSwitch
- Hide file extension ToggleSwitch
- Hide starting digits ToggleSwitch
- Replace variables ToggleSwitch
## Testing
Screen readers (Windows Narrator) now properly announce controls with
context:
- **Before**: "Combo box"
- **After**: "Language, Combo box"
No functional changes to application behavior. The fix only affects how
controls are announced to assistive technologies.
## Notes
This fix follows the existing pattern already used in
ColorPickerPage.xaml. Similar issues exist in approximately 23 other
Settings pages which can be addressed in future PRs using this
established pattern. The pages fixed in this PR represent
commonly-accessed settings and demonstrate the solution approach for
comprehensive coverage.
Closes #<issue_number>
## References
- WCAG 2.2 SC 1.3.1:
https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships
- UIA Name Property:
https://learn.microsoft.com/en-us/windows/apps/design/accessibility/accessible-text-requirements#name_property_alternative_and_description
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>Controls Inside Sections Are Not Associated with Their
Labels.</issue_title>
> <issue_description>### Microsoft PowerToys version
>
> v0.94.2
>
> ### Installation method
>
> PowerToys auto-update
>
> ### Area(s) with issue?
>
> New+
>
> ### Steps to reproduce
>
> **Repro Steps:**
>
> 1. Open the Power Toys.
> 2. Now navigate to the home present in the left navigation pane.
> 3. Now turn on the narrator using CTRL + Win + Enter.
> 4. Now navigate to the controls present inside the different sections.
> 5. Observe the issue.
>
> ### ✔️ Expected Behavior
>
> Each control should be programmatically associated with its
corresponding label so screen readers can accurately convey the purpose
of the control to users.
>
> ### ❌ Actual Behavior
>
> Input controls (e.g., checkboxes, text fields, dropdowns) located
within different sections of the UI are not programmatically associated
with their visible labels.
>
> ### Additional Information
>
> **User Impact:**
> Screen reader users may hear only the control type (e.g., “edit text”)
with no context or description of what it is for. This makes it
difficult or impossible for them to fill out forms or interact with the
UI correctly, leading to confusion and frustration.
>
> **WCAG Reference:**
> https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships
>
> **Attachments:**
>
>
https://github.com/user-attachments/assets/d25b9237-bee7-41d5-b564-df15df19b0d4
>
> ### Other Software
>
> _No response_</issue_description>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
Fixes microsoft/PowerToys#42419
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/microsoft/PowerToys/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com>
Co-authored-by: Gordon Lam (SH) <yeelam@microsoft.com>
This commit is contained in:
@@ -240,6 +240,7 @@
|
|||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="Languages_ComboBox"
|
x:Name="Languages_ComboBox"
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=LanguageHeader, Path=Header}"
|
||||||
DisplayMemberPath="Language"
|
DisplayMemberPath="Language"
|
||||||
ItemsSource="{Binding Languages, Mode=TwoWay}"
|
ItemsSource="{Binding Languages, Mode=TwoWay}"
|
||||||
SelectedIndex="{Binding LanguagesIndex, Mode=TwoWay}" />
|
SelectedIndex="{Binding LanguagesIndex, Mode=TwoWay}" />
|
||||||
@@ -262,7 +263,10 @@
|
|||||||
<tkcontrols:SettingsCard.Description>
|
<tkcontrols:SettingsCard.Description>
|
||||||
<HyperlinkButton x:Uid="Windows_Color_Settings" Click="OpenColorsSettings_Click" />
|
<HyperlinkButton x:Uid="Windows_Color_Settings" Click="OpenColorsSettings_Click" />
|
||||||
</tkcontrols:SettingsCard.Description>
|
</tkcontrols:SettingsCard.Description>
|
||||||
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind ViewModel.ThemeIndex, Mode=TwoWay}">
|
<ComboBox
|
||||||
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=ColorModeHeader, Path=Header}"
|
||||||
|
SelectedIndex="{x:Bind ViewModel.ThemeIndex, Mode=TwoWay}">
|
||||||
<ComboBoxItem x:Uid="Radio_Theme_Dark" />
|
<ComboBoxItem x:Uid="Radio_Theme_Dark" />
|
||||||
<ComboBoxItem x:Uid="Radio_Theme_Light" />
|
<ComboBoxItem x:Uid="Radio_Theme_Light" />
|
||||||
<ComboBoxItem x:Uid="Radio_Theme_Default" />
|
<ComboBoxItem x:Uid="Radio_Theme_Default" />
|
||||||
@@ -273,12 +277,16 @@
|
|||||||
Name="GeneralPageRunAtStartUp"
|
Name="GeneralPageRunAtStartUp"
|
||||||
x:Uid="GeneralPage_RunAtStartUp"
|
x:Uid="GeneralPage_RunAtStartUp"
|
||||||
IsEnabled="{x:Bind ViewModel.IsRunAtStartupGPOManaged, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
|
IsEnabled="{x:Bind ViewModel.IsRunAtStartupGPOManaged, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
|
||||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.Startup, Mode=TwoWay}" />
|
<ToggleSwitch
|
||||||
|
x:Uid="ToggleSwitch"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=GeneralPageRunAtStartUp, Path=Header}"
|
||||||
|
IsOn="{x:Bind ViewModel.Startup, Mode=TwoWay}" />
|
||||||
</tkcontrols:SettingsCard>
|
</tkcontrols:SettingsCard>
|
||||||
<controls:GPOInfoControl ShowWarning="{x:Bind ViewModel.IsRunAtStartupGPOManaged, Mode=OneWay}">
|
<controls:GPOInfoControl ShowWarning="{x:Bind ViewModel.IsRunAtStartupGPOManaged, Mode=OneWay}">
|
||||||
<tkcontrols:SettingsCard x:Uid="ShowSystemTrayIcon">
|
<tkcontrols:SettingsCard x:Name="ShowSystemTrayIconCard" x:Uid="ShowSystemTrayIcon">
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
x:Uid="ShowSystemTrayIcon_ToggleSwitch"
|
x:Uid="ShowSystemTrayIcon_ToggleSwitch"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=ShowSystemTrayIconCard, Path=Header}"
|
||||||
IsOn="{x:Bind ViewModel.ShowSysTrayIcon, Mode=TwoWay}"
|
IsOn="{x:Bind ViewModel.ShowSysTrayIcon, Mode=TwoWay}"
|
||||||
Toggled="ShowSystemTrayIcon_Toggled" />
|
Toggled="ShowSystemTrayIcon_Toggled" />
|
||||||
</tkcontrols:SettingsCard>
|
</tkcontrols:SettingsCard>
|
||||||
@@ -398,12 +406,16 @@
|
|||||||
<tkcontrols:SettingsCard.HeaderIcon>
|
<tkcontrols:SettingsCard.HeaderIcon>
|
||||||
<PathIcon Data="M1859 1758q14 23 21 47t7 51q0 40-15 75t-41 61-61 41-75 15H354q-40 0-75-15t-61-41-41-61-15-75q0-27 6-51t21-47l569-992q10-14 10-34V128H640V0h768v128h-128v604q0 19 10 35l569 991zM896 732q0 53-27 99l-331 577h972l-331-577q-27-46-27-99V128H896v604zm799 1188q26 0 44-19t19-45q0-10-2-17t-8-16l-164-287H464l-165 287q-9 15-9 33 0 26 18 45t46 19h1341z" />
|
<PathIcon Data="M1859 1758q14 23 21 47t7 51q0 40-15 75t-41 61-61 41-75 15H354q-40 0-75-15t-61-41-41-61-15-75q0-27 6-51t21-47l569-992q10-14 10-34V128H640V0h768v128h-128v604q0 19 10 35l569 991zM896 732q0 53-27 99l-331 577h972l-331-577q-27-46-27-99V128H896v604zm799 1188q26 0 44-19t19-45q0-10-2-17t-8-16l-164-287H464l-165 287q-9 15-9 33 0 26 18 45t46 19h1341z" />
|
||||||
</tkcontrols:SettingsCard.HeaderIcon>
|
</tkcontrols:SettingsCard.HeaderIcon>
|
||||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.EnableExperimentation, Mode=TwoWay}" />
|
<ToggleSwitch
|
||||||
|
x:Uid="ToggleSwitch"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=GeneralPageEnableExperimentation, Path=Header}"
|
||||||
|
IsOn="{x:Bind ViewModel.EnableExperimentation, Mode=TwoWay}" />
|
||||||
</tkcontrols:SettingsCard>
|
</tkcontrols:SettingsCard>
|
||||||
</controls:GPOInfoControl>
|
</controls:GPOInfoControl>
|
||||||
</controls:SettingsGroup>
|
</controls:SettingsGroup>
|
||||||
<controls:SettingsGroup x:Uid="General_DiagnosticsAndFeedback">
|
<controls:SettingsGroup x:Uid="General_DiagnosticsAndFeedback">
|
||||||
<tkcontrols:SettingsExpander
|
<tkcontrols:SettingsExpander
|
||||||
|
x:Name="GeneralPageEnableDataDiagnostics"
|
||||||
x:Uid="GeneralPage_EnableDataDiagnostics"
|
x:Uid="GeneralPage_EnableDataDiagnostics"
|
||||||
HeaderIcon="{ui:FontIcon Glyph=}"
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
||||||
IsEnabled="{x:Bind ViewModel.IsDataDiagnosticsGPOManaged, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"
|
IsEnabled="{x:Bind ViewModel.IsDataDiagnosticsGPOManaged, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}"
|
||||||
@@ -421,10 +433,19 @@
|
|||||||
NavigateUri="https://aka.ms/powertoys-data-and-privacy-documentation" />
|
NavigateUri="https://aka.ms/powertoys-data-and-privacy-documentation" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</tkcontrols:SettingsExpander.Description>
|
</tkcontrols:SettingsExpander.Description>
|
||||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.EnableDataDiagnostics, Mode=TwoWay}" />
|
<ToggleSwitch
|
||||||
|
x:Uid="ToggleSwitch"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=GeneralPageEnableDataDiagnostics, Path=Header}"
|
||||||
|
IsOn="{x:Bind ViewModel.EnableDataDiagnostics, Mode=TwoWay}" />
|
||||||
<tkcontrols:SettingsExpander.Items>
|
<tkcontrols:SettingsExpander.Items>
|
||||||
<tkcontrols:SettingsCard x:Uid="GeneralPage_EnableViewDiagnosticData" IsEnabled="{x:Bind ViewModel.EnableDataDiagnostics, Mode=TwoWay}">
|
<tkcontrols:SettingsCard
|
||||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.EnableViewDataDiagnostics, Mode=TwoWay}" />
|
x:Name="GeneralPageEnableViewDiagnosticData"
|
||||||
|
x:Uid="GeneralPage_EnableViewDiagnosticData"
|
||||||
|
IsEnabled="{x:Bind ViewModel.EnableDataDiagnostics, Mode=TwoWay}">
|
||||||
|
<ToggleSwitch
|
||||||
|
x:Uid="ToggleSwitch"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=GeneralPageEnableViewDiagnosticData, Path=Header}"
|
||||||
|
IsOn="{x:Bind ViewModel.EnableViewDataDiagnostics, Mode=TwoWay}" />
|
||||||
<tkcontrols:SettingsCard.Description>
|
<tkcontrols:SettingsCard.Description>
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
|||||||
@@ -23,7 +23,10 @@
|
|||||||
Name="NewPlusEnableToggle"
|
Name="NewPlusEnableToggle"
|
||||||
x:Uid="NewPlus_Enable_Toggle"
|
x:Uid="NewPlus_Enable_Toggle"
|
||||||
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/NewPlus.png}">
|
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/NewPlus.png}">
|
||||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
|
<ToggleSwitch
|
||||||
|
x:Uid="ToggleSwitch"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=NewPlusEnableToggle, Path=Header}"
|
||||||
|
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
|
||||||
</tkcontrols:SettingsCard>
|
</tkcontrols:SettingsCard>
|
||||||
</controls:GPOInfoControl>
|
</controls:GPOInfoControl>
|
||||||
<controls:SettingsGroup x:Uid="NewPlus_Templates" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
<controls:SettingsGroup x:Uid="NewPlus_Templates" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
||||||
@@ -60,12 +63,18 @@
|
|||||||
Name="NewPlusHideFileExtensionToggle"
|
Name="NewPlusHideFileExtensionToggle"
|
||||||
x:Uid="NewPlus_Hide_File_Extension_Toggle"
|
x:Uid="NewPlus_Hide_File_Extension_Toggle"
|
||||||
IsEnabled="{x:Bind ViewModel.IsHideFileExtSettingsCardEnabled, Mode=OneWay}">
|
IsEnabled="{x:Bind ViewModel.IsHideFileExtSettingsCardEnabled, Mode=OneWay}">
|
||||||
<ToggleSwitch x:Uid="HideFileExtensionToggle" IsOn="{x:Bind ViewModel.HideFileExtension, Mode=TwoWay}" />
|
<ToggleSwitch
|
||||||
|
x:Uid="HideFileExtensionToggle"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=NewPlusHideFileExtensionToggle, Path=Header}"
|
||||||
|
IsOn="{x:Bind ViewModel.HideFileExtension, Mode=TwoWay}" />
|
||||||
</tkcontrols:SettingsCard>
|
</tkcontrols:SettingsCard>
|
||||||
</controls:GPOInfoControl>
|
</controls:GPOInfoControl>
|
||||||
<tkcontrols:SettingsCard Name="NewPlusHideStartingDigitsToggle" x:Uid="NewPlus_Hide_Starting_Digits_Toggle">
|
<tkcontrols:SettingsCard Name="NewPlusHideStartingDigitsToggle" x:Uid="NewPlus_Hide_Starting_Digits_Toggle">
|
||||||
|
|
||||||
<ToggleSwitch x:Uid="HideStartingDigitsToggle" IsOn="{x:Bind ViewModel.HideStartingDigits, Mode=TwoWay}" />
|
<ToggleSwitch
|
||||||
|
x:Uid="HideStartingDigitsToggle"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=NewPlusHideStartingDigitsToggle, Path=Header}"
|
||||||
|
IsOn="{x:Bind ViewModel.HideStartingDigits, Mode=TwoWay}" />
|
||||||
<tkcontrols:SettingsCard.Description>
|
<tkcontrols:SettingsCard.Description>
|
||||||
<TextBlock x:Uid="NewPlus_Hide_Starting_Digits_Description" />
|
<TextBlock x:Uid="NewPlus_Hide_Starting_Digits_Description" />
|
||||||
</tkcontrols:SettingsCard.Description>
|
</tkcontrols:SettingsCard.Description>
|
||||||
@@ -79,7 +88,10 @@
|
|||||||
x:Uid="NewPlus_Behaviour_Replace_Variables_Toggle"
|
x:Uid="NewPlus_Behaviour_Replace_Variables_Toggle"
|
||||||
IsEnabled="{x:Bind ViewModel.IsReplaceVariablesSettingsCardEnabled, Mode=OneWay}">
|
IsEnabled="{x:Bind ViewModel.IsReplaceVariablesSettingsCardEnabled, Mode=OneWay}">
|
||||||
<StackPanel Orientation="Horizontal" Spacing="4">
|
<StackPanel Orientation="Horizontal" Spacing="4">
|
||||||
<ToggleSwitch x:Uid="ReplaceVariablesToggle" IsOn="{x:Bind ViewModel.ReplaceVariables, Mode=TwoWay}" />
|
<ToggleSwitch
|
||||||
|
x:Uid="ReplaceVariablesToggle"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=NewPlusBehaviourReplaceVariablesToggle, Path=Header}"
|
||||||
|
IsOn="{x:Bind ViewModel.ReplaceVariables, Mode=TwoWay}" />
|
||||||
<Button
|
<Button
|
||||||
x:Uid="FileCreationButton"
|
x:Uid="FileCreationButton"
|
||||||
Width="28"
|
Width="28"
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
Header="{x:Bind Path=DisplayLabel}">
|
Header="{x:Bind Path=DisplayLabel}">
|
||||||
<ComboBox
|
<ComboBox
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
|
AutomationProperties.Name="{x:Bind Path=DisplayLabel}"
|
||||||
DisplayMemberPath="Key"
|
DisplayMemberPath="Key"
|
||||||
ItemsSource="{x:Bind Path=ComboBoxItems}"
|
ItemsSource="{x:Bind Path=ComboBoxItems}"
|
||||||
SelectedValue="{x:Bind ComboBoxValue, Mode=TwoWay}"
|
SelectedValue="{x:Bind ComboBoxValue, Mode=TwoWay}"
|
||||||
@@ -110,6 +111,7 @@
|
|||||||
Header="{x:Bind Path=DisplayLabel}">
|
Header="{x:Bind Path=DisplayLabel}">
|
||||||
<NumberBox
|
<NumberBox
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
|
AutomationProperties.Name="{x:Bind Path=DisplayLabel}"
|
||||||
LargeChange="{x:Bind NumberBoxLargeChange, Mode=OneWay}"
|
LargeChange="{x:Bind NumberBoxLargeChange, Mode=OneWay}"
|
||||||
Maximum="{x:Bind NumberBoxMax, Mode=OneWay}"
|
Maximum="{x:Bind NumberBoxMax, Mode=OneWay}"
|
||||||
Minimum="{x:Bind NumberBoxMin, Mode=OneWay}"
|
Minimum="{x:Bind NumberBoxMin, Mode=OneWay}"
|
||||||
@@ -175,6 +177,7 @@
|
|||||||
IsEnabled="{x:Bind SecondSettingIsEnabled, Mode=OneWay}">
|
IsEnabled="{x:Bind SecondSettingIsEnabled, Mode=OneWay}">
|
||||||
<ComboBox
|
<ComboBox
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
|
AutomationProperties.Name="{x:Bind Path=SecondDisplayLabel}"
|
||||||
DisplayMemberPath="Key"
|
DisplayMemberPath="Key"
|
||||||
ItemsSource="{x:Bind Path=ComboBoxItems}"
|
ItemsSource="{x:Bind Path=ComboBoxItems}"
|
||||||
SelectedValue="{x:Bind ComboBoxValue, Mode=TwoWay}"
|
SelectedValue="{x:Bind ComboBoxValue, Mode=TwoWay}"
|
||||||
@@ -290,6 +293,7 @@
|
|||||||
IsEnabled="{x:Bind SecondSettingIsEnabled, Mode=OneWay}">
|
IsEnabled="{x:Bind SecondSettingIsEnabled, Mode=OneWay}">
|
||||||
<NumberBox
|
<NumberBox
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
|
AutomationProperties.Name="{x:Bind Path=SecondDisplayLabel}"
|
||||||
LargeChange="{x:Bind NumberBoxLargeChange, Mode=OneWay}"
|
LargeChange="{x:Bind NumberBoxLargeChange, Mode=OneWay}"
|
||||||
Maximum="{x:Bind NumberBoxMax, Mode=OneWay}"
|
Maximum="{x:Bind NumberBoxMax, Mode=OneWay}"
|
||||||
Minimum="{x:Bind NumberBoxMin, Mode=OneWay}"
|
Minimum="{x:Bind NumberBoxMin, Mode=OneWay}"
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
Name="PowerRenameToggleEnable"
|
Name="PowerRenameToggleEnable"
|
||||||
x:Uid="PowerRename_Toggle_Enable"
|
x:Uid="PowerRename_Toggle_Enable"
|
||||||
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/PowerRename.png}">
|
HeaderIcon="{ui:BitmapIcon Source=/Assets/Settings/Icons/PowerRename.png}">
|
||||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
|
<ToggleSwitch
|
||||||
|
x:Uid="ToggleSwitch"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=PowerRenameToggleEnable, Path=Header}"
|
||||||
|
IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
|
||||||
</tkcontrols:SettingsCard>
|
</tkcontrols:SettingsCard>
|
||||||
</controls:GPOInfoControl>
|
</controls:GPOInfoControl>
|
||||||
<controls:SettingsGroup x:Uid="PowerRename_ShellIntegration" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
<controls:SettingsGroup x:Uid="PowerRename_ShellIntegration" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
||||||
@@ -30,7 +33,10 @@
|
|||||||
Name="PowerRenameToggleContextMenu"
|
Name="PowerRenameToggleContextMenu"
|
||||||
x:Uid="PowerRename_Toggle_ContextMenu"
|
x:Uid="PowerRename_Toggle_ContextMenu"
|
||||||
IsExpanded="False">
|
IsExpanded="False">
|
||||||
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind ViewModel.EnabledOnContextExtendedMenu, Mode=TwoWay, Converter={StaticResource BoolToComboBoxIndexConverter}}">
|
<ComboBox
|
||||||
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=PowerRenameToggleContextMenu, Path=Header}"
|
||||||
|
SelectedIndex="{x:Bind ViewModel.EnabledOnContextExtendedMenu, Mode=TwoWay, Converter={StaticResource BoolToComboBoxIndexConverter}}">
|
||||||
<ComboBoxItem x:Uid="PowerRename_Toggle_StandardContextMenu" />
|
<ComboBoxItem x:Uid="PowerRename_Toggle_StandardContextMenu" />
|
||||||
<ComboBoxItem x:Uid="PowerRename_Toggle_ExtendedContextMenu" />
|
<ComboBoxItem x:Uid="PowerRename_Toggle_ExtendedContextMenu" />
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
@@ -53,7 +59,10 @@
|
|||||||
Name="PowerRenameToggleAutoComplete"
|
Name="PowerRenameToggleAutoComplete"
|
||||||
x:Uid="PowerRename_Toggle_AutoComplete"
|
x:Uid="PowerRename_Toggle_AutoComplete"
|
||||||
IsExpanded="True">
|
IsExpanded="True">
|
||||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.MRUEnabled, Mode=TwoWay}" />
|
<ToggleSwitch
|
||||||
|
x:Uid="ToggleSwitch"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=PowerRenameToggleAutoComplete, Path=Header}"
|
||||||
|
IsOn="{x:Bind ViewModel.MRUEnabled, Mode=TwoWay}" />
|
||||||
<tkcontrols:SettingsExpander.Items>
|
<tkcontrols:SettingsExpander.Items>
|
||||||
<tkcontrols:SettingsCard
|
<tkcontrols:SettingsCard
|
||||||
Name="PowerRenameToggleMaxDispListNum"
|
Name="PowerRenameToggleMaxDispListNum"
|
||||||
@@ -61,6 +70,7 @@
|
|||||||
IsEnabled="{x:Bind ViewModel.GlobalAndMruEnabled, Mode=OneWay}">
|
IsEnabled="{x:Bind ViewModel.GlobalAndMruEnabled, Mode=OneWay}">
|
||||||
<NumberBox
|
<NumberBox
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=PowerRenameToggleMaxDispListNum, Path=Header}"
|
||||||
Maximum="20"
|
Maximum="20"
|
||||||
Minimum="0"
|
Minimum="0"
|
||||||
SpinButtonPlacementMode="Compact"
|
SpinButtonPlacementMode="Compact"
|
||||||
@@ -73,12 +83,18 @@
|
|||||||
Name="PowerRenameToggleRestoreFlagsOnLaunch"
|
Name="PowerRenameToggleRestoreFlagsOnLaunch"
|
||||||
x:Uid="PowerRename_Toggle_RestoreFlagsOnLaunch"
|
x:Uid="PowerRename_Toggle_RestoreFlagsOnLaunch"
|
||||||
HeaderIcon="{ui:FontIcon Glyph=}">
|
HeaderIcon="{ui:FontIcon Glyph=}">
|
||||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.RestoreFlagsOnLaunch, Mode=TwoWay}" />
|
<ToggleSwitch
|
||||||
|
x:Uid="ToggleSwitch"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=PowerRenameToggleRestoreFlagsOnLaunch, Path=Header}"
|
||||||
|
IsOn="{x:Bind ViewModel.RestoreFlagsOnLaunch, Mode=TwoWay}" />
|
||||||
</tkcontrols:SettingsCard>
|
</tkcontrols:SettingsCard>
|
||||||
</controls:SettingsGroup>
|
</controls:SettingsGroup>
|
||||||
<controls:SettingsGroup x:Uid="PowerRename_BehaviorHeader" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
<controls:SettingsGroup x:Uid="PowerRename_BehaviorHeader" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
||||||
<tkcontrols:SettingsCard Name="PowerRenameToggleUseBoostLib" x:Uid="PowerRename_Toggle_UseBoostLib">
|
<tkcontrols:SettingsCard Name="PowerRenameToggleUseBoostLib" x:Uid="PowerRename_Toggle_UseBoostLib">
|
||||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.UseBoostLib, Mode=TwoWay}" />
|
<ToggleSwitch
|
||||||
|
x:Uid="ToggleSwitch"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=PowerRenameToggleUseBoostLib, Path=Header}"
|
||||||
|
IsOn="{x:Bind ViewModel.UseBoostLib, Mode=TwoWay}" />
|
||||||
</tkcontrols:SettingsCard>
|
</tkcontrols:SettingsCard>
|
||||||
</controls:SettingsGroup>
|
</controls:SettingsGroup>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
Reference in New Issue
Block a user