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

Custom docking pane

1 Answer 34 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 14 Jan 2013, 10:33 AM
Hello,
I'm working on a scenario where the docking panes are created programmatically on user demand. As the panes contains the same type of display (only the DataContext is bound to a different object), I would like to define a custom pane, inheriting from the RadDocumentPane control. My goal is to have the header and the content of the pane to be defined in XAML, with bindings to the properties of the object to display.
I've tried some scenarios, but either they don't display data (the bindings don't work) or I have errors when the pane is closed.
Do you have some indications on how to implement this?
Thank you in advance.
Patrick

1 Answer, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 17 Jan 2013, 12:18 PM
Hi Patrick,

I am copying the answer from your support thread so it will be available for the community.

This could be achieved by using implicit styles without creating a custom class derived from RadDocumentPane. You will just need to create an implicit style that sets ContentTemplate and HeaderTemplate and set the RadPane's Content and Header properties to their DataContexts when creating them. I prepared a sample example that demonstrates how this can be achieved.

Greetings,
Ivo
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Docking
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Ivo
Telerik team
Share this question
or