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

Enherit from RadButton and Click Events

2 Answers 54 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
HDC
Top achievements
Rank 1
HDC asked on 20 Jul 2011, 08:42 PM
I have created a button that enherits from RadButton

When i click the button, the click event is not raised on the enheritted button.

I know it has to do with routed events... i know you can have a class handler that bubbles the event up.

But... I have two enheritted buttons on my form, each has his own click event handler. Because of the class handler when i click one button, the click events on both buttons is raised.

How can i make an instance handler that will allow specifying an event on both of enheritted buttons like one does with normal buttons?

2 Answers, 1 is accepted

Sort by
0
Accepted
Zarko
Telerik team
answered on 25 Jul 2011, 05:02 PM
Hi Peter,
Unfortunately I'm not quite sure what's the problem because I wasn't able to reproduce it. When I inherit our RadButton everything seems to be working fine. Could you please examine the attached sample project and see if is of any help to you.
If need further assistance please feel free to ask, but I'd like to ask you if you could send us some code snippets or a project that reproduces the issue.

All the best,
Zarko
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
HDC
Top achievements
Rank 1
answered on 26 Jul 2011, 09:21 AM
Hello Zarko,

The problem was a little more complex. I Use a RadButton in a composite control. The composite control itself uses a Style with a ControlTemplate. I finally fixed it by using a RoutedEventHandler.

Thank you for your help!


Peter.
Tags
Buttons
Asked by
HDC
Top achievements
Rank 1
Answers by
Zarko
Telerik team
HDC
Top achievements
Rank 1
Share this question
or