fix WLAN menu keyboard accessibility
This commit is contained in:
parent
1ad20567b8
commit
5c5a70ad73
8 changed files with 60 additions and 2 deletions
|
@ -34,5 +34,10 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
|
||||||
NetworkNameTextBlock.Text = network.Name;
|
NetworkNameTextBlock.Text = network.Name;
|
||||||
SignalStrengthTextBlock.Text = $"{network.SignalStrength}%";
|
SignalStrengthTextBlock.Text = $"{network.SignalStrength}%";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetFocus()
|
||||||
|
{
|
||||||
|
Button.Focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,18 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
|
||||||
Popup.IsOpen = Popup.IsMouseOver;
|
Popup.IsOpen = Popup.IsMouseOver;
|
||||||
}));
|
}));
|
||||||
Popup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = IsMouseOver));
|
Popup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = IsMouseOver));
|
||||||
Popup.Opened += (o, args) => Grid.Background = Brushes.Gray;
|
Popup.Opened += (o, args) =>
|
||||||
|
{
|
||||||
|
Grid.Background = Brushes.Gray;
|
||||||
|
Task.Delay(100).ContinueWith((task) => Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
var btn = WirelessNetworksStackPanel.Children[0] as NetworkButton;
|
||||||
|
if (btn != null)
|
||||||
|
{
|
||||||
|
btn.SetFocus();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
};
|
||||||
Popup.Closed += (o, args) => Grid.Background = originalBrush;
|
Popup.Closed += (o, args) => Grid.Background = originalBrush;
|
||||||
WirelessIcon.Child = GetWirelessIcon(0);
|
WirelessIcon.Child = GetWirelessIcon(0);
|
||||||
|
|
||||||
|
|
|
@ -34,5 +34,10 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
|
||||||
NetworkNameTextBlock.Text = network.Name;
|
NetworkNameTextBlock.Text = network.Name;
|
||||||
SignalStrengthTextBlock.Text = $"{network.SignalStrength}%";
|
SignalStrengthTextBlock.Text = $"{network.SignalStrength}%";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetFocus()
|
||||||
|
{
|
||||||
|
Button.Focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,14 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
|
||||||
{
|
{
|
||||||
Background = Brushes.LightGray;
|
Background = Brushes.LightGray;
|
||||||
Button.Background = Brushes.LightGray;
|
Button.Background = Brushes.LightGray;
|
||||||
|
Task.Delay(100).ContinueWith((task) => Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
var btn = WirelessNetworksStackPanel.Children[0] as NetworkButton;
|
||||||
|
if (btn != null)
|
||||||
|
{
|
||||||
|
btn.SetFocus();
|
||||||
|
}
|
||||||
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
Popup.Closed += (o, args) =>
|
Popup.Closed += (o, args) =>
|
||||||
|
|
|
@ -34,5 +34,10 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
|
||||||
NetworkNameTextBlock.Text = network.Name;
|
NetworkNameTextBlock.Text = network.Name;
|
||||||
SignalStrengthTextBlock.Text = $"{network.SignalStrength}%";
|
SignalStrengthTextBlock.Text = $"{network.SignalStrength}%";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetFocus()
|
||||||
|
{
|
||||||
|
Button.Focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,18 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
|
||||||
Popup.IsOpen = Popup.IsMouseOver;
|
Popup.IsOpen = Popup.IsMouseOver;
|
||||||
}));
|
}));
|
||||||
Popup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = IsMouseOver));
|
Popup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = IsMouseOver));
|
||||||
Popup.Opened += (o, args) => Grid.Background = Brushes.Gray;
|
Popup.Opened += (o, args) =>
|
||||||
|
{
|
||||||
|
Grid.Background = Brushes.Gray;
|
||||||
|
Task.Delay(100).ContinueWith((task) => Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
var btn = WirelessNetworksStackPanel.Children[0] as NetworkButton;
|
||||||
|
if (btn != null)
|
||||||
|
{
|
||||||
|
btn.SetFocus();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
};
|
||||||
Popup.Closed += (o, args) => Grid.Background = originalBrush;
|
Popup.Closed += (o, args) => Grid.Background = originalBrush;
|
||||||
WirelessIcon.Child = GetWirelessIcon(0);
|
WirelessIcon.Child = GetWirelessIcon(0);
|
||||||
|
|
||||||
|
|
|
@ -34,5 +34,10 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
|
||||||
NetworkNameTextBlock.Text = network.Name;
|
NetworkNameTextBlock.Text = network.Name;
|
||||||
SignalStrengthTextBlock.Text = $"{network.SignalStrength}%";
|
SignalStrengthTextBlock.Text = $"{network.SignalStrength}%";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetFocus()
|
||||||
|
{
|
||||||
|
Button.Focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,14 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
|
||||||
{
|
{
|
||||||
Background = Brushes.LightGray;
|
Background = Brushes.LightGray;
|
||||||
Button.Background = Brushes.LightGray;
|
Button.Background = Brushes.LightGray;
|
||||||
|
Task.Delay(100).ContinueWith((task) => Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
var btn = WirelessNetworksStackPanel.Children[0] as NetworkButton;
|
||||||
|
if (btn != null)
|
||||||
|
{
|
||||||
|
btn.SetFocus();
|
||||||
|
}
|
||||||
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
Popup.Closed += (o, args) =>
|
Popup.Closed += (o, args) =>
|
||||||
|
|
Loading…
Reference in a new issue