RadButton mouse event doesn't work

2 posts, 0 answers
  1. jixc2008 jixc2008
    jixc2008 jixc2008 avatar
    1 posts
    Member since:
    May 2010

    Posted 05 Jun Link to this post

    <telerik:RadButton x:Name="button" Width="48" Height="40" BorderThickness="0" Foreground="{x:Null}"  MouseLeftButtonDown="button_MouseLeftButtonDown" MouseLeftButtonUp="button_MouseLeftButtonUp" MouseUp="button_MouseUp" MouseDown="button_MouseDown">

    RadButton mouse event doesn't work.

  2. Martin
    Admin
    Martin avatar
    60 posts

    Posted 07 Jun Link to this post

    Hello,

    The Click event handles the MouseLeftButtonUp and MouseLeftButtonDownEvent so that is why the events would not work. You can use the UIElement.AddHandler method to subscribe for the desired events.
    button.AddHandler(Button.MouseLeftButtonDownEvent, new MouseButtonEventHandler(YourEventHandler), true);

    Regards,
    Martin
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top