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

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

6 Answers 202 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Kris Mackintosh
Top achievements
Rank 1
Kris Mackintosh asked on 21 Jan 2010, 01:56 AM
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

6 Answers, 1 is accepted

Sort by
0
Kris Mackintosh
Top achievements
Rank 1
answered on 21 Jan 2010, 02:04 AM
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
0
Kris Mackintosh
Top achievements
Rank 1
answered on 21 Jan 2010, 08:19 PM
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 :(
0
Accepted
Konstantina
Telerik team
answered on 22 Jan 2010, 10:53 AM
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.
0
Kris Mackintosh
Top achievements
Rank 1
answered on 24 Jan 2010, 08:14 PM
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

 

0
Alexey
Top achievements
Rank 1
answered on 13 Apr 2011, 02:40 PM
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!
0
Konstantina
Telerik team
answered on 15 Apr 2011, 12:57 PM
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
Tags
Docking
Asked by
Kris Mackintosh
Top achievements
Rank 1
Answers by
Kris Mackintosh
Top achievements
Rank 1
Konstantina
Telerik team
Alexey
Top achievements
Rank 1
Share this question
or