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

RadDocking Multiple Custom Themes?

1 Answer 63 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Frankie
Top achievements
Rank 1
Frankie asked on 15 Dec 2011, 02:11 AM
Hello,

I am attempting to theme two different RadDocking controls, within the same solution, each with its own custom theme. I have followed the instructions/example mentioned here and have been able to get the first theme applied. Is it possible to create a second theme to be applied to another RadDocking control?

I would also like to apply each theme in XAML, as demonstrated here in the RadDockingTheming Overview.

Thanks,
Frankie

1 Answer, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 20 Dec 2011, 10:52 AM
Hello Frankie,

Yes, it is possible to have multiple custom themes and apply a different custom theme to a different instance of the RadDocking control. For example:
<Window.Resources>
        <theme1:Theme1 x:Key="Theme1" />
        <theme2:Theme2 x:Key="Theme2" />
    </Window.Resources>
  
    <Grid x:Name="LayoutRoot">
        <telerikDocking:RadDocking Margin="8,8,0,8" HorizontalAlignment="Left" Width="273" telerik:StyleManager.Theme="{StaticResource Theme1}">
            <telerikDocking:RadSplitContainer>
                <telerikDocking:RadPaneGroup telerik:StyleManager.Theme="{StaticResource Theme1}">
                    <telerikDocking:RadPane Header="Pane 1" telerik:StyleManager.Theme="{StaticResource Theme1}"/>
                    <telerikDocking:RadPane Header="Pane 2" telerik:StyleManager.Theme="{StaticResource Theme1}"/>
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadSplitContainer>
        </telerikDocking:RadDocking>
  
        <telerikDocking:RadDocking HorizontalAlignment="Right" Margin="0,8,8,8" Width="273"  telerik:StyleManager.Theme="{StaticResource Theme2}">
            <telerikDocking:RadSplitContainer>
                <telerikDocking:RadPaneGroup telerik:StyleManager.Theme="{StaticResource Theme2}">
                    <telerikDocking:RadPane Header="Pane 1" telerik:StyleManager.Theme="{StaticResource Theme2}"/>
                    <telerikDocking:RadPane Header="Pane 2" telerik:StyleManager.Theme="{StaticResource Theme2}"/>
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadSplitContainer>
        </telerikDocking:RadDocking>


Remember to include the ThemeInfo attribute in AssemblyInfo.cs:
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]

I hope this helps.

All the best,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Docking
Asked by
Frankie
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or