RadMaskedNumericInput and MouseWheel Event

3 posts, 0 answers
  1. Ezequiel
    Ezequiel avatar
    3 posts
    Member since:
    Mar 2014

    Posted 18 Mar 2014 Link to this post

    Hi there!

    When i'm over RadMaskedNumericInput control the scroll screen not work. In short, RadMaskedNumericInput's MouseWheel Event no trigger although the control is set  <telerik:RadMaskedNumericInput SpinMode="None"/>

    Thank you.
    Best regards.


  2. Boris
    Admin
    Boris avatar
    276 posts

    Posted 21 Mar 2014 Link to this post

    Hello Ezequiel,

    The RadMaskedInputControls handle internally the MouseWheel event and that is why this event does not fire when you subscribe for it. A possible way to trigger the MouseWheel event of the RadMaskedNumericInput is to inherit its class and override the OnMouseWheel() method.

    public class CustomMaskedNumericInput : RadMaskedNumericInput
       {
           protected override void OnMouseWheel(MouseWheelEventArgs e)
           {
           }       
       }

    I attached a sample project that demonstrates the suggested approach. When you run the example you will see that in XAML there are several Buttons and the CustomMaskedNumericInput wrapped in a ScrollViewer. This is done to demonstrate that the MouseWheel event will trigger the scrolling of the ScrollViewer even when the CustomMaskedNumericInput is focused.

    However, we are not entirely sure what you are trying to achieve. If this is not exactly your case could you please elaborate a bit more on it ?

    Regards,
    Boris Penev
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ezequiel
    Ezequiel avatar
    3 posts
    Member since:
    Mar 2014

    Posted 21 Mar 2014 in reply to Boris Link to this post

    It works! 

    Thank you so much for your support! 
Back to Top