mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[FancyZones Editor][Accessibility] Default focused elements in all FancyZones Editor windows (#7971)
* Default focused elements * Fix focus when starting editor from settings
This commit is contained in:
@@ -154,9 +154,11 @@ namespace FancyZonesEditor
|
||||
mainEditor.Edit();
|
||||
|
||||
EditorWindow window;
|
||||
bool isGrid = false;
|
||||
if (model is GridLayoutModel)
|
||||
{
|
||||
window = new GridEditorWindow();
|
||||
isGrid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -166,6 +168,10 @@ namespace FancyZonesEditor
|
||||
window.Owner = EditorOverlay.Current;
|
||||
window.DataContext = model;
|
||||
window.Show();
|
||||
if (isGrid)
|
||||
{
|
||||
(window as GridEditorWindow).NameTextBox().Focus();
|
||||
}
|
||||
}
|
||||
|
||||
private void Apply_Click(object sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user