mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 03:07:56 +01:00
[FancyZones] Add AutomationProperties.Name to focusable elements (#7372)
* Add AutomationProperties.Name to focusable elements * Add AutomationProperties.Name to focusable elements * Use AutomationProperties.LabeledBy with buttons / text boxes * Address PR comments
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<local:EditorWindow x:Class="FancyZonesEditor.CanvasEditorWindow"
|
||||
AutomationProperties.Name="{x:Static props:Resources.Canvas_Layout_Editor}"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
@@ -166,14 +167,14 @@
|
||||
</Window.Resources>
|
||||
<StackPanel>
|
||||
<TextBlock Name="windowEditorDialogTitle" Text="{x:Static props:Resources.Custom_Layout_Creator}" Style="{StaticResource titleText}" />
|
||||
<Button x:Name="newZoneButton" Width="496" Height="136" Style="{StaticResource newZoneButton}" Click="OnAddZone">
|
||||
<Button x:Name="newZoneButton" AutomationProperties.LabeledBy="{Binding ElementName=newZoneName}" Width="496" Height="136" Style="{StaticResource newZoneButton}" Click="OnAddZone">
|
||||
<StackPanel>
|
||||
<TextBlock x:Name="newSoneName" Text="{x:Static props:Resources.Add_zone}" Style="{StaticResource templateTitleText}" />
|
||||
<TextBlock x:Name="newZoneName" Text="{x:Static props:Resources.Add_zone}" Style="{StaticResource templateTitleText}" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="+" Margin="0,-40,0,0"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<TextBlock Text="{x:Static props:Resources.Name}" Style="{StaticResource textLabel}" />
|
||||
<TextBox Text="{Binding Name}" Width="496" Style="{StaticResource textBox}" />
|
||||
<TextBlock x:Name="customLayoutName" Text="{x:Static props:Resources.Name}" Style="{StaticResource textLabel}" />
|
||||
<TextBox Text="{Binding Name}" AutomationProperties.LabeledBy="{Binding ElementName=customLayoutName}" Width="496" Style="{StaticResource textBox}" />
|
||||
<!--
|
||||
<StackPanel Orientation="Horizontal" Margin="0,8,0,0">
|
||||
<CheckBox x:Name="showGridSetting" VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="True" Margin="16,4,0,0"/>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<Controls:MetroWindow x:Class="FancyZonesEditor.MainWindow"
|
||||
x:Name="MainWindow1"
|
||||
AutomationProperties.Name="{x:Static props:Resources.Fancy_Zones_Main_Editor}"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
@@ -178,9 +179,9 @@
|
||||
|
||||
<StackPanel>
|
||||
|
||||
<TextBlock Name="dialog_Title" Text="{x:Static props:Resources.Choose_Layout}" Style="{StaticResource titleText}" />
|
||||
<TextBlock Name="DialogTitle" Text="{x:Static props:Resources.Choose_Layout}" Style="{StaticResource titleText}" />
|
||||
|
||||
<TabControl BorderThickness="0" x:Name="TemplateTab" SelectedIndex="{Binding IsCustomLayoutActive, Mode=OneWay, Converter={StaticResource BooleanToIntConverter}}">
|
||||
<TabControl BorderThickness="0" x:Name="TemplateTab" AutomationProperties.LabeledBy="{Binding ElementName=DialogTitle}" SelectedIndex="{Binding IsCustomLayoutActive, Mode=OneWay, Converter={StaticResource BooleanToIntConverter}}">
|
||||
<TabItem Header="{x:Static props:Resources.Templates}" Template="{StaticResource myTabs}">
|
||||
<StackPanel>
|
||||
<StackPanel Margin="0,15,0,8" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
@@ -259,10 +260,10 @@
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="10,4,0,8">
|
||||
<CheckBox x:Name="spaceAroundSetting" Content="{x:Static props:Resources.Show_Space_Zones}" Style="{StaticResource settingCheckBoxText}" IsChecked="{Binding ShowSpacing}"/>
|
||||
<TextBlock Text="{x:Static props:Resources.Space_Around_Zones}" Style="{StaticResource settingText}" IsEnabled="{Binding ShowSpacing}" />
|
||||
<TextBox x:Name="paddingValue" Text="{Binding Path=Spacing,Mode=TwoWay}" Style="{StaticResource textBox}" MinWidth="32" IsEnabled="{Binding ShowSpacing}"/>
|
||||
<TextBlock Text="{x:Static props:Resources.Distance_adjacent_zones}" Style="{StaticResource settingText}"/>
|
||||
<TextBox x:Name="sensitivityRadiusValue" Text="{Binding Path=SensitivityRadius,Mode=TwoWay}" Style="{StaticResource textBox}" MinWidth="40"/>
|
||||
<TextBlock x:Name="paddingValue" Text="{x:Static props:Resources.Space_Around_Zones}" Style="{StaticResource settingText}" IsEnabled="{Binding ShowSpacing}" />
|
||||
<TextBox AutomationProperties.LabeledBy="{Binding ElementName=paddingValue}" Text="{Binding Path=Spacing,Mode=TwoWay}" Style="{StaticResource textBox}" MinWidth="32" IsEnabled="{Binding ShowSpacing}"/>
|
||||
<TextBlock x:Name="sensitivityRadiusValue" Text="{x:Static props:Resources.Distance_adjacent_zones}" Style="{StaticResource settingText}"/>
|
||||
<TextBox AutomationProperties.LabeledBy="{Binding ElementName=sensitivityRadiusValue}" Text="{Binding Path=SensitivityRadius,Mode=TwoWay}" Style="{StaticResource textBox}" MinWidth="40"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,16">
|
||||
|
||||
@@ -87,6 +87,15 @@ namespace FancyZonesEditor.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Canvas layout editor.
|
||||
/// </summary>
|
||||
public static string Canvas_Layout_Editor {
|
||||
get {
|
||||
return ResourceManager.GetString("Canvas_Layout_Editor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Choose your layout for this desktop.
|
||||
/// </summary>
|
||||
@@ -168,6 +177,15 @@ namespace FancyZonesEditor.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to FancyZones main editor.
|
||||
/// </summary>
|
||||
public static string Fancy_Zones_Main_Editor {
|
||||
get {
|
||||
return ResourceManager.GetString("Fancy_Zones_Main_Editor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Name.
|
||||
/// </summary>
|
||||
|
||||
@@ -126,6 +126,9 @@
|
||||
<data name="Cancel" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="Canvas_Layout_Editor" xml:space="preserve">
|
||||
<value>Canvas layout editor</value>
|
||||
</data>
|
||||
<data name="Choose_Layout" xml:space="preserve">
|
||||
<value>Choose your layout for this desktop</value>
|
||||
</data>
|
||||
@@ -153,6 +156,9 @@
|
||||
<data name="Fancy_Zones_Editor_App_Title" xml:space="preserve">
|
||||
<value>FancyZones Editor</value>
|
||||
</data>
|
||||
<data name="Fancy_Zones_Main_Editor" xml:space="preserve">
|
||||
<value>FancyZones main editor</value>
|
||||
</data>
|
||||
<data name="Name" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user