mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-21 00:14:15 +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"
|
Margin="12,0,0,0"
|
||||||
ui:ControlHelper.Header="{x:Static props:Resources.Name}"
|
ui:ControlHelper.Header="{x:Static props:Resources.Name}"
|
||||||
MinWidth="286"
|
MinWidth="286"
|
||||||
HorizontalAlignment="Stretch" />
|
HorizontalAlignment="Stretch"
|
||||||
|
GotKeyboardFocus="TextBox_GotKeyboardFocus"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Shortcut panel -->
|
<!-- 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