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
    Martin avatar
    54 posts

    Posted 07 Jun Link to this post


    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);

    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top