Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
365
SpinWrap=False in a XamNumericEditor keeps incrementing/decrementing its value
posted

I've set SpinWrap=False in a XamNumericEditor but when I hit key up or key down, the value increments or decrements respectively.

How can I disable the increment/decrement function for a XamNumericEditor? I want the XamNumericEditor does not change its value when the user presses key up/down.

Thank you very much

Parents
  • 54937
    Offline posted

    SpinWrap has to do with whether the value will spin from the max to the min when spinning up or from the min to the max when spinning down. It is not a means of preventing spinning. Currently there is no property to disable spinning - essentially certain types of masked sections support spinning. If you want to disable the spinning you will need to handle the ExecutingCommand event and cancel it if the SpinUp|Down command is being processed. e.g.

    private void XamNumericEditor_ExecutingCommand(object sender, ExecutingCommandEventArgs e)
    {
    if (e.Command == MaskedEditorCommands.SpinUp ||
    e.Command == MaskedEditorCommands.SpinDown)
    {
    e.Cancel = true;
    }
    }

     

Reply Children