Skip to content

Commit

Permalink
Merge pull request #3526 from MahApps/feature/NumericUpDown_Focus_Cha…
Browse files Browse the repository at this point in the history
…ngeOnEnterKey

NumericUpDown: Add a property to control changing value with key Enter
  • Loading branch information
punker76 committed Jun 7, 2019
2 parents a3f7a48 + 19c4541 commit 2d8d99c
Show file tree
Hide file tree
Showing 3 changed files with 352 additions and 250 deletions.
Expand Up @@ -403,6 +403,29 @@
IsReadOnly="{Binding ElementName=ReadOnlyCheck, Path=IsChecked, Mode=TwoWay}"
NumericInputMode="{Binding ElementName=NumericInputCheckBox, Path=SelectedItem, Mode=TwoWay}"
Value="500" />

<Label Content="Focusing / Value changing" />
<CheckBox Margin="1"
Content="Up / Down Buttons are focusable"
IsChecked="{Binding UpDownButtonsFocusable, ElementName=numericUpDownFocus, Mode=TwoWay}" />
<CheckBox Margin="1"
Content="Change value directly on TextChanged event"
IsChecked="{Binding ChangeValueOnTextChanged, ElementName=numericUpDownFocus, Mode=TwoWay}" />
<Slider Margin="{StaticResource ControlMargin}"
Interval="1"
IsSnapToTickEnabled="True"
LargeChange="5"
Maximum="20"
Minimum="0"
SmallChange="1"
TickFrequency="1"
TickPlacement="BottomRight"
Value="{Binding ElementName=numericUpDownFocus, Path=Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<Controls:NumericUpDown x:Name="numericUpDownFocus"
Margin="{StaticResource ControlMargin}"
Maximum="20"
Minimum="0"
Value="0" />
</StackPanel>

<StackPanel Grid.Row="1"
Expand Down

0 comments on commit 2d8d99c

Please sign in to comment.