How on earth do you theme RadDocking and its associated controls!

7 posts, 1 answers
  1. Kris Mackintosh
    Kris Mackintosh avatar
    7 posts
    Member since:
    Jun 2004

    Posted 20 Jan 2010 Link to this post

    Ive been trying to theme RadDocking and its associated controls for a long time now, always getting so far but falling short of what i want.

    I understand that you must create a theme and not set explisit styles to ensure the styles are kept when a panel is floated, so my approach has been to set the styles in a resource dictionary, create a theme based on this dictionary (

    <

     

    telerik:Theme x:Key="MyTheme" Source="/RadControlsSilverlightApplication1;component/Resources/DockTheme.xaml" />

     

    ) and set the them on my Raddocking to this theme (telerik:StyleManager.Theme="{StaticResource MyTheme}") , problem is that i can never get it to fully work... my latest issue is the moment is that the PaneHeader never picks up the default theme, even when i grab one of the demo theme's files (RadControls for Silverlight Q3 2009 SP1\Themes\Summer\Themes\Summer\Docking.xaml) and change the template <ControlTemplate x:Key="PaneHeaderTemplate" TargetType="dock:PaneHeader"> it is still ignored

    So my question is how do i fully skin RadDocking and all its associated controls and is there an example someone can point me to?

    -Kris
  2. Kris Mackintosh
    Kris Mackintosh avatar
    7 posts
    Member since:
    Jun 2004

    Posted 20 Jan 2010 Link to this post

    thought i should mention, the example docking theme provided with the installer contains a default style for the PaneHeader

     

     

    <Style TargetType="dock:PaneHeader">

     

     

     

    <Setter Property="Template" Value="{StaticResource PaneHeaderTemplate}" />

     



    which points to the template i mentioned above that appears to be ignored
  3. DevCraft banner
  4. Kris Mackintosh
    Kris Mackintosh avatar
    7 posts
    Member since:
    Jun 2004

    Posted 21 Jan 2010 Link to this post

    So ive gotten a bit further but again ive run into something that makes no sense to me
    so for some reason the style defined in my theme <Style TargetType="dock:PaneHeader"> gets ignored so instead, for every instance of the PaneHeader in my theme, i explicitly set its template (Template="{StaticResource PaneHeaderTemplate}") and this works fine, the header's template is applied, even when the pane is floated... EXCEPT when the pane is unpinned... it looses its style and goes back to its default look.... help :(
  5. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 22 Jan 2010 Link to this post

    Hi Kris,

    Thank you for contacting us.

    Attached you will find a simple project where a custom theme is made for the RadDocking. Please try it out and give us feedback if you experience problems again. In the sample project the Background property of the header of the pane is set to Red and the pin icon is made bigger. If that project works for you, you can use it as a base.

    If you have further questions please do not hesitate to contact us again.

    All the best,
    Konstantina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Kris Mackintosh
    Kris Mackintosh avatar
    7 posts
    Member since:
    Jun 2004

    Posted 24 Jan 2010 Link to this post

    Thankyou for your reply

    So the main thing you have done is essentially make a self referencing theme, you have a xaml file defining the styles and a class inheriting from Theme that sets its source to the xaml file and in the xaml file you define an instance of your theme class and set the paneHeader's styles to that theme.

    one thing i did to make the theme visible in blend was to set the theme via xaml

     

     

     

    <UserControl.Resources>

     

     

     

     

     

     

     

    <themes:CustomTheme x:Name="MyTheme" />

     

     

     

     

     

     

     

    </UserControl.Resources>

     

     

     

     

     

     

     

     

    <Grid x:Name="LayoutRoot">

     

     

     

     

     

     

     

    <telerikDocking:RadDocking telerik:StyleManager.Theme="{StaticResource MyTheme}">

     

     

     

     

     

     

     

    <telerikDocking:RadSplitContainer>

     

     

     

     

     

     

     

    <telerikDocking:RadPaneGroup>

     

     

     

     

     

     

     

    <telerikDocking:RadPane Header="Pane 1"/>

     

     

     

     

     

     

     

    <telerikDocking:RadPane Header="Pane 2"/>

     

     

     

     

     

     

     

    </telerikDocking:RadPaneGroup>

     

     

     

     

     

     

     

    </telerikDocking:RadSplitContainer>

     

     

     

     

     

     

     

    </telerikDocking:RadDocking>

     

     

     

     

     

     

     

    </Grid>


    thanks for your help
    -Kris

     

  7. Alexey
    Alexey avatar
    1 posts
    Member since:
    Mar 2011

    Posted 13 Apr 2011 Link to this post

    Hello!

    Could you, PLEASE, provide a code sample for RadDocking custom theming for this case:
    - VS 2010
    - WPF 
    - we have installed your controls from http://www.telerik.com/products/wpf.aspx

    We have tried as mentioned in your guide (http://www.telerik.com/help/wpf/raddocking-theming-pane-header.html and related links), but couldn't  set our theme globally for all related controls. We were able to make things work only by explicitly setting a particular style to specific control.

    Thanks in advance!
  8. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 15 Apr 2011 Link to this post

    Hi Alexey,

    For a sample application with custom theme for WPF of the Docking control please refer to this forum post.

    Greetings,
    Konstantina
    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
Back to Top
DevCraft banner