This is a migrated thread and some comments may be shown as answers.

RadButton mouse event doesn't work

1 Answer 42 Views
Expander
This is a migrated thread and some comments may be shown as answers.
jixc2008 jixc2008
Top achievements
Rank 1
jixc2008 jixc2008 asked on 06 Jun 2016, 04:39 AM

<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.

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 07 Jun 2016, 11:02 AM
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.
Tags
Expander
Asked by
jixc2008 jixc2008
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or