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
<Style TargetType="dock:PaneHeader">
<Setter Property="Template" Value="{StaticResource PaneHeaderTemplate}" />
which points to the template i mentioned above that appears to be ignored
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 :(
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.
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
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!
For a sample application with custom theme for WPF of the Docking control please refer to this forum post.
Greetings,
Konstantina
the Telerik team