Input: bind Enter key to SubmitCommand for enter-to-evaluate
This commit is contained in:
parent
eaab9bb9d4
commit
9483bd01eb
1 changed files with 7 additions and 3 deletions
|
@ -155,7 +155,11 @@
|
|||
|
||||
<TextBox Grid.Column="2" Text="{Binding InputText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MinHeight="44"
|
||||
AutomationProperties.Name="Expression input"
|
||||
Watermark="Type an expression (e.g., 2 + 2)"/>
|
||||
Watermark="Type an expression (e.g., 2 + 2)">
|
||||
<InputElement.KeyBindings>
|
||||
<KeyBinding Gesture="Enter" Command="{Binding SubmitCommand}" />
|
||||
</InputElement.KeyBindings>
|
||||
</TextBox>
|
||||
|
||||
<!-- Explicit evaluate button for touch -->
|
||||
<Button Grid.Column="3" Command="{Binding SubmitCommand}" MinHeight="44" Padding="16,8"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue