mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-20 16:03:17 +08:00
Place cursor in the end of the name on textbox focus (#12607)
This commit is contained in:
parent
d106db8061
commit
7751fed39e
@ -390,7 +390,8 @@
|
||||
Margin="12,0,0,0"
|
||||
ui:ControlHelper.Header="{x:Static props:Resources.Name}"
|
||||
MinWidth="286"
|
||||
HorizontalAlignment="Stretch" />
|
||||
HorizontalAlignment="Stretch"
|
||||
GotKeyboardFocus="TextBox_GotKeyboardFocus"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Shortcut panel -->
|
||||
|
@ -446,5 +446,11 @@ namespace FancyZonesEditor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void TextBox_GotKeyboardFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
TextBox tb = sender as TextBox;
|
||||
tb.SelectionStart = tb.Text.Length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user