Custom docking pane

2 posts, 0 answers
  1. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 14 Jan 2013 Link to this post

    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
  2. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 17 Jan 2013 Link to this post

    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.

  3. DevCraft banner
Back to Top