Adding back binding to QueryText and updating the cursor position similar to how wox originally did it.

This commit is contained in:
ryanbodrug-microsoft 2020-04-23 18:32:18 -07:00
parent d4da98bae5
commit 7add40ae93
2 changed files with 7 additions and 0 deletions

View file

@ -375,6 +375,7 @@
x:FieldModifier="public"
Style="{StaticResource CustomAutoSuggestBoxTextBoxStyle}"
PlaceholderText="Start typing"
Text="{Binding QueryText}"
Height="60"
ScrollViewer.BringIntoViewOnFocusChange="False"
Canvas.ZIndex="0"

View file

@ -354,6 +354,12 @@ namespace PowerLauncher
{
_launcher.AutoCompleteTextBox.PlaceholderText = String.Empty;
}
if (_viewModel.QueryTextCursorMovedToEnd)
{
_launcher.TextBox.SelectionStart = _launcher.TextBox.Text.Length;
_viewModel.QueryTextCursorMovedToEnd = false;
}
}
private async Task DelayedCheck(DateTime latestTimeOfTyping, string text)