work on accessibility
This commit is contained in:
parent
900115d66c
commit
14ef0a2b2a
8 changed files with 36 additions and 10 deletions
|
@ -35,7 +35,9 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
|
|||
Icon.Content = IconResourceLoader.Load(window?.Icon ?? application.Icon);
|
||||
Text.Text = window?.Title ?? application.Name;
|
||||
Button.Click += (o, args) => Clicked?.Invoke(this, EventArgs.Empty);
|
||||
Button.ToolTip = window?.Title ?? application.Tooltip;
|
||||
var tooltip = window?.Title ?? application.Tooltip;
|
||||
Button.ToolTip = tooltip;
|
||||
System.Windows.Automation.AutomationProperties.SetName(Button, tooltip);
|
||||
|
||||
if (window != null)
|
||||
{
|
||||
|
|
|
@ -114,6 +114,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
|
|||
this.muted = muted;
|
||||
|
||||
Button.ToolTip = info;
|
||||
System.Windows.Automation.AutomationProperties.SetName(Button, info);
|
||||
Text.Text = info;
|
||||
Volume.ValueChanged -= Volume_ValueChanged;
|
||||
Volume.Value = Math.Round(volume * 100);
|
||||
|
@ -121,14 +122,18 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
|
|||
|
||||
if (muted)
|
||||
{
|
||||
var tooltip = text.Get(TextKey.SystemControl_AudioDeviceUnmuteTooltip);
|
||||
MuteButton.ToolTip = tooltip;
|
||||
System.Windows.Automation.AutomationProperties.SetName(MuteButton, tooltip);
|
||||
ButtonIcon.Content = IconResourceLoader.Load(MutedIcon);
|
||||
MuteButton.ToolTip = text.Get(TextKey.SystemControl_AudioDeviceUnmuteTooltip);
|
||||
PopupIcon.Content = IconResourceLoader.Load(MutedIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
var tooltip = text.Get(TextKey.SystemControl_AudioDeviceMuteTooltip);
|
||||
MuteButton.ToolTip = tooltip;
|
||||
System.Windows.Automation.AutomationProperties.SetName(MuteButton, tooltip);
|
||||
ButtonIcon.Content = LoadIcon(volume);
|
||||
MuteButton.ToolTip = text.Get(TextKey.SystemControl_AudioDeviceMuteTooltip);
|
||||
PopupIcon.Content = LoadIcon(volume);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
|
|||
Button.MouseEnter += (o, args) => WindowPopup.IsOpen = WindowStackPanel.Children.Count > 0;
|
||||
Button.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => WindowPopup.IsOpen = WindowPopup.IsMouseOver || ActiveBar.IsMouseOver));
|
||||
Button.ToolTip = application.Tooltip;
|
||||
System.Windows.Automation.AutomationProperties.SetName(Button, application.Tooltip);
|
||||
WindowPopup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(WindowPopup_PlacementCallback);
|
||||
WindowPopup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => WindowPopup.IsOpen = IsMouseOver));
|
||||
|
||||
|
|
|
@ -132,19 +132,24 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
|
|||
this.muted = muted;
|
||||
|
||||
Button.ToolTip = info;
|
||||
System.Windows.Automation.AutomationProperties.SetName(Button, info);
|
||||
Volume.ValueChanged -= Volume_ValueChanged;
|
||||
Volume.Value = Math.Round(volume * 100);
|
||||
Volume.ValueChanged += Volume_ValueChanged;
|
||||
|
||||
if (muted)
|
||||
{
|
||||
MuteButton.ToolTip = text.Get(TextKey.SystemControl_AudioDeviceUnmuteTooltip);
|
||||
var tooltip = text.Get(TextKey.SystemControl_AudioDeviceUnmuteTooltip);
|
||||
MuteButton.ToolTip = tooltip;
|
||||
System.Windows.Automation.AutomationProperties.SetName(MuteButton, tooltip);
|
||||
PopupIcon.Content = IconResourceLoader.Load(MutedIcon);
|
||||
ButtonIcon.Content = IconResourceLoader.Load(MutedIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
MuteButton.ToolTip = text.Get(TextKey.SystemControl_AudioDeviceMuteTooltip);
|
||||
var tooltip = text.Get(TextKey.SystemControl_AudioDeviceMuteTooltip);
|
||||
MuteButton.ToolTip = tooltip;
|
||||
System.Windows.Automation.AutomationProperties.SetName(MuteButton, tooltip);
|
||||
PopupIcon.Content = LoadIcon(volume);
|
||||
ButtonIcon.Content = LoadIcon(volume);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,9 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
|
|||
Icon.Content = IconResourceLoader.Load(window?.Icon ?? application.Icon);
|
||||
Text.Text = window?.Title ?? application.Name;
|
||||
Button.Click += (o, args) => Clicked?.Invoke(this, EventArgs.Empty);
|
||||
Button.ToolTip = window?.Title ?? application.Tooltip;
|
||||
var tooltip = window?.Title ?? application.Tooltip;
|
||||
Button.ToolTip = tooltip;
|
||||
System.Windows.Automation.AutomationProperties.SetName(Button, tooltip);
|
||||
|
||||
if (window != null)
|
||||
{
|
||||
|
|
|
@ -113,6 +113,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
|
|||
this.muted = muted;
|
||||
|
||||
Button.ToolTip = info;
|
||||
System.Windows.Automation.AutomationProperties.SetName(Button, info);
|
||||
Text.Text = info;
|
||||
Volume.ValueChanged -= Volume_ValueChanged;
|
||||
Volume.Value = Math.Round(volume * 100);
|
||||
|
@ -120,14 +121,18 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
|
|||
|
||||
if (muted)
|
||||
{
|
||||
var tooltip = text.Get(TextKey.SystemControl_AudioDeviceUnmuteTooltip);
|
||||
MuteButton.ToolTip = tooltip;
|
||||
System.Windows.Automation.AutomationProperties.SetName(MuteButton, tooltip);
|
||||
ButtonIcon.Content = IconResourceLoader.Load(MutedIcon);
|
||||
MuteButton.ToolTip = text.Get(TextKey.SystemControl_AudioDeviceUnmuteTooltip);
|
||||
PopupIcon.Content = IconResourceLoader.Load(MutedIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
var tooltip = text.Get(TextKey.SystemControl_AudioDeviceMuteTooltip);
|
||||
MuteButton.ToolTip = tooltip;
|
||||
System.Windows.Automation.AutomationProperties.SetName(MuteButton, tooltip);
|
||||
ButtonIcon.Content = LoadIcon(volume);
|
||||
MuteButton.ToolTip = text.Get(TextKey.SystemControl_AudioDeviceMuteTooltip);
|
||||
PopupIcon.Content = LoadIcon(volume);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
|
|||
Button.MouseEnter += (o, args) => WindowPopup.IsOpen = WindowStackPanel.Children.Count > 0;
|
||||
Button.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => WindowPopup.IsOpen = WindowPopup.IsMouseOver || ActiveBar.IsMouseOver));
|
||||
Button.ToolTip = application.Tooltip;
|
||||
System.Windows.Automation.AutomationProperties.SetName(Button, application.Tooltip);
|
||||
WindowPopup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(WindowPopup_PlacementCallback);
|
||||
WindowPopup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => WindowPopup.IsOpen = IsMouseOver));
|
||||
|
||||
|
|
|
@ -132,19 +132,24 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
|
|||
this.muted = muted;
|
||||
|
||||
Button.ToolTip = info;
|
||||
System.Windows.Automation.AutomationProperties.SetName(Button, info);
|
||||
Volume.ValueChanged -= Volume_ValueChanged;
|
||||
Volume.Value = Math.Round(volume * 100);
|
||||
Volume.ValueChanged += Volume_ValueChanged;
|
||||
|
||||
if (muted)
|
||||
{
|
||||
MuteButton.ToolTip = text.Get(TextKey.SystemControl_AudioDeviceUnmuteTooltip);
|
||||
var tooltip = text.Get(TextKey.SystemControl_AudioDeviceUnmuteTooltip);
|
||||
MuteButton.ToolTip = tooltip;
|
||||
System.Windows.Automation.AutomationProperties.SetName(MuteButton, tooltip);
|
||||
PopupIcon.Content = IconResourceLoader.Load(MutedIcon);
|
||||
ButtonIcon.Content = IconResourceLoader.Load(MutedIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
MuteButton.ToolTip = text.Get(TextKey.SystemControl_AudioDeviceMuteTooltip);
|
||||
var tooltip = text.Get(TextKey.SystemControl_AudioDeviceMuteTooltip);
|
||||
MuteButton.ToolTip = tooltip;
|
||||
System.Windows.Automation.AutomationProperties.SetName(MuteButton, tooltip);
|
||||
PopupIcon.Content = LoadIcon(volume);
|
||||
ButtonIcon.Content = LoadIcon(volume);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue