Applying Themes for Coverflow at RunTime

2 posts, 0 answers
  1. Venu Madhav Deevi
    Venu Madhav Deevi avatar
    8 posts
    Member since:
    Sep 2009

    Posted 22 Nov 2009 Link to this post

    Hi,

    Please let me know how to apply themes for Coverflow, Dock Panel headers at Run time based on User selecting a theme ?

    Thanks,
    Venu Madhav Deevi.
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 24 Nov 2009 Link to this post

    Hi Venu,

    You could use the StyleManager.Theme attached property for this. Here is an example of what I mean:
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
         
        <ComboBox x:Name="themesCombo" SelectedIndex="0">
            <telerik:Office_BlackTheme />
            <telerik:Office_BlueTheme />
            <telerik:Office_SilverTheme />
            <telerik:VistaTheme />
            <telerik:SummerTheme />
            <telerik:Windows7Theme />
        </ComboBox>
     
        <telerikNavigation:RadCoverFlow Grid.Row="1"
                telerik:StyleManager.Theme="{Binding SelectedItem, ElementName=themesCombo}">
            <Rectangle Width="100" Height="100" Fill="Red" />
            <Rectangle Width="100" Height="100" Fill="Green" />
            <Rectangle Width="100" Height="100" Fill="Blue" />
            <Rectangle Width="100" Height="100" Fill="Yellow" />
        </telerikNavigation:RadCoverFlow>
         
        <telerikDocking:RadDocking Grid.Row="2" telerik:StyleManager.Theme="{Binding SelectedItem, ElementName=themesCombo}">
            <telerikDocking:RadSplitContainer>
                <telerikDocking:RadPaneGroup>
                    <telerikDocking:RadPane Header="Pane">
                        <Button Content="ASDASD" />
                    </telerikDocking:RadPane>
                    <telerikDocking:RadPane Header="Pane">
                        <Button Content="ASDASD" />
                    </telerikDocking:RadPane>
                </telerikDocking:RadPaneGroup>
     
                <telerikDocking:RadPaneGroup>
                    <telerikDocking:RadPane Header="Pane">
                        <Button Content="ASDASD" />
                    </telerikDocking:RadPane>
                    <telerikDocking:RadPane Header="Pane">
                        <Button Content="ASDASD" />
                    </telerikDocking:RadPane>
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadSplitContainer>
             
            <telerikDocking:RadDocking.DocumentHost>
                <telerikDocking:RadSplitContainer>
                    <telerikDocking:RadPaneGroup>
                        <telerikDocking:RadPane Header="Pane">
                            <Button Content="ASDASD" />
                        </telerikDocking:RadPane>
                        <telerikDocking:RadPane Header="Pane">
                            <Button Content="ASDASD" />
                        </telerikDocking:RadPane>
                    </telerikDocking:RadPaneGroup>
     
                    <telerikDocking:RadPaneGroup>
                        <telerikDocking:RadPane Header="Pane">
                            <Button Content="ASDASD" />
                        </telerikDocking:RadPane>
                        <telerikDocking:RadPane Header="Pane">
                            <Button Content="ASDASD" />
                        </telerikDocking:RadPane>
                    </telerikDocking:RadPaneGroup>
                </telerikDocking:RadSplitContainer>
            </telerikDocking:RadDocking.DocumentHost>
        </telerikDocking:RadDocking>
    </Grid>

    Hope this helps.

    Greetings,
    Miroslav Nedyalkov
    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.
  3. DevCraft banner
Back to Top