feat: place caret inside inserted function parentheses\n\n- Add CaretIndex to MainViewModel and bind TextBox.CaretIndex\n- After function insertion, set caret to inside parentheses\n- Return focus to input box for immediate typing
This commit is contained in:
parent
2c7670f06c
commit
b8ba57a707
3 changed files with 15 additions and 1 deletions
|
@ -94,6 +94,9 @@ public partial class MainView : UserControl
|
|||
_vm?.InsertFunctionCommand.CanExecute(item) == true)
|
||||
{
|
||||
_vm.InsertFunctionCommand.Execute(item);
|
||||
// Return focus to the input box so the caret is active
|
||||
var input = this.FindControl<TextBox>("InputBox");
|
||||
input?.Focus();
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue