Execute a command when the Enter key is pressed

2 posts, 0 answers
  1. Method
    Method avatar
    8 posts
    Member since:
    Jul 2012

    Posted 13 Sep 2013 Link to this post

    <telerik:RadMaskedNumericInput Value="{Binding Quantity, Mode=TwoWay}">
        <telerik:RadMaskedNumericInput.InputBindings>
            <KeyBinding Key="Enter" Command="{Binding DoSomethingCommand}" />
            <KeyBinding Key="Tab" Command="{Binding DoSomethingCommand}" />
        </telerik:RadMaskedNumericInput.InputBindings>
    </telerik:RadMaskedNumericInput>
    I am trying to call to a command when the Enter key is pressed like an exemple above.
    The Tab KeyBinding works perfectly, but the Enter doesn't work.

    This behavior works in a TextBox, is this possible in a MaskedInput?
  2. Method
    Method avatar
    8 posts
    Member since:
    Jul 2012

    Posted 13 Sep 2013 Link to this post


     Problem solved.

     I just set the property AcceptsReturn to False.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top