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

RadDocking and routed events mechanism

2 Answers 36 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Neil
Top achievements
Rank 1
Neil asked on 19 Feb 2010, 08:30 AM
Hi,

I'm adding additional title bar buttons to the RadPane using the example in your documentation.   In order to get events when the buttons are clicked I am using the routed events mechanism as described in the same section. 

This is working well, when a button is pressed the event is fired in the application.      The hard part solved I guess, what I can't seem to figure out is quite how to identify the RadPane control which the button was fired on?

My RadPanes are all dynamically created along with the RadDocking control.

I was looking for events to be fired when a RadPane becomes selected but I couldn't get this to work either.   Any suggestions would be welcomed.

Kind regards
Neil

2 Answers, 1 is accepted

Sort by
0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 19 Feb 2010, 11:45 AM
Hello Neil,

 If you customize the header of the pane (that is displayed as a tab item) you might use the following code:

button.ParentOfType<RadPane>()
where button is the button that fired the event (the OriginalSource of the Click event).

If you are customizing the other header (with the close and pin buttons) you cannot use this code as the header is placed directly into the PaneGroup. What you could do is to use the following code:

button.ParentOfType<RadPaneGroup>().SelectedItem as RadPane

Hope this helps.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Neil
Top achievements
Rank 1
answered on 19 Feb 2010, 11:57 AM
Hi ya,

Thanks that work's well.  

Kind regards
Neil
Tags
Docking
Asked by
Neil
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Neil
Top achievements
Rank 1
Share this question
or