mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[ImageResizer]Make narrator announce sizes ComboBox and CheckBoxes (#32311)
This commit is contained in:
committed by
GitHub
parent
8a210865ff
commit
daae8f22de
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace ImageResizer.Views
|
||||
{
|
||||
public class AccessTextToTextConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return ((string)value).Replace("_", string.Empty);
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
AutomationProperties.Name="{x:Static p:Resources.Image_Sizes}"
|
||||
ItemsSource="{Binding Settings.AllSizes}"
|
||||
SelectedIndex="{Binding Settings.SelectedSizeIndex}">
|
||||
<ComboBox.Resources>
|
||||
@@ -197,25 +198,25 @@
|
||||
Grid.Row="1"
|
||||
Margin="16"
|
||||
Orientation="Vertical">
|
||||
<CheckBox IsChecked="{Binding Settings.ShrinkOnly}">
|
||||
<CheckBox AutomationProperties.Name="{Binding RelativeSource={RelativeSource Self}, Path=Content.(AccessText.Text), Converter={StaticResource AccessTextToTextConverter}}" IsChecked="{Binding Settings.ShrinkOnly}">
|
||||
<CheckBox.Content>
|
||||
<AccessText Text="{x:Static p:Resources.Input_ShrinkOnly}" TextWrapping="Wrap" />
|
||||
</CheckBox.Content>
|
||||
</CheckBox>
|
||||
|
||||
<CheckBox IsChecked="{Binding Settings.IgnoreOrientation}">
|
||||
<CheckBox AutomationProperties.Name="{Binding RelativeSource={RelativeSource Self}, Path=Content.(AccessText.Text), Converter={StaticResource AccessTextToTextConverter}}" IsChecked="{Binding Settings.IgnoreOrientation}">
|
||||
<CheckBox.Content>
|
||||
<AccessText Text="{x:Static p:Resources.Input_IgnoreOrientation}" TextWrapping="Wrap" />
|
||||
</CheckBox.Content>
|
||||
</CheckBox>
|
||||
|
||||
<CheckBox IsChecked="{Binding Settings.Replace}">
|
||||
<CheckBox AutomationProperties.Name="{Binding RelativeSource={RelativeSource Self}, Path=Content.(AccessText.Text), Converter={StaticResource AccessTextToTextConverter}}" IsChecked="{Binding Settings.Replace}">
|
||||
<CheckBox.Content>
|
||||
<AccessText Text="{x:Static p:Resources.Input_Replace}" TextWrapping="Wrap" />
|
||||
</CheckBox.Content>
|
||||
</CheckBox>
|
||||
|
||||
<CheckBox IsChecked="{Binding Settings.RemoveMetadata}">
|
||||
<CheckBox AutomationProperties.Name="{Binding RelativeSource={RelativeSource Self}, Path=Content.(AccessText.Text), Converter={StaticResource AccessTextToTextConverter}}" IsChecked="{Binding Settings.RemoveMetadata}">
|
||||
<CheckBox.Content>
|
||||
<AccessText Text="{x:Static p:Resources.Input_RemoveMetadata}" TextWrapping="Wrap" />
|
||||
</CheckBox.Content>
|
||||
|
||||
Reference in New Issue
Block a user