problem with styling theme of a PaneHeader

2 posts, 0 answers
  1. alino
    alino avatar
    22 posts
    Member since:
    Sep 2010

    Posted 01 Mar 2011 Link to this post

    Hi,

    I have a problem  with theming a paneHeader of a RadPane. I follow exactly the steps as described on telerik website but at the end the theme does not apply. Here is the attached project where i did this theming.

    Thank u for your Help.

    this is my XAML Code:

    <UserControl
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        x:Class="DockingTheme.MainPage"
        mc:Ignorable="d"
        d:DesignHeight="300" d:DesignWidth="400">
      
        <Grid x:Name="LayoutRoot">
            <telerik:RadDocking x:Name="_radocking">
                <telerik:RadDocking.DocumentHost>
                    <telerik:RadSplitContainer>
                        <telerik:RadPaneGroup x:Name="_paneGroup">
                            <telerik:RadPane x:Name="_pane" Header="My panel 1" />
                            <telerik:RadPane x:Name="_pane1" Header="My Panel 2"/>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                </telerik:RadDocking.DocumentHost>
            </telerik:RadDocking>
        </Grid>
    </UserControl>

    In the code behind i have this in the constructor:
    public MainPage()
           {
               InitializeComponent();
               StyleManager.SetTheme(this._radocking, new Theme(new Uri("/DockingTheme;component/Themes/PaneHeaderTheme.xaml", UriKind.Relative)));
           }

    And finally the style of the pane header as explained in telerik documentation. I did it in Expression blend and created a resource file to define this style.

    <ResourceDictionary
        xmlns:Telerik_Windows_Controls_Chromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls">
      
        <Thickness x:Key="HeaderButtonMargin">0 2 2 1</Thickness>
        <telerik:Office_BlackTheme x:Key="Theme"/>
        <SolidColorBrush x:Key="ButtonIconBackground_Normal" Color="#FFFFFFFF"/>
        <SolidColorBrush x:Key="ButtonIconForeground_Normal" Color="#FF000000"/>
        <SolidColorBrush x:Key="ButtonIconForeground_Disabled" Color="#FF8D8D8D"/>
        <SolidColorBrush x:Key="ButtonIconBackground_Disabled" Color="#FFFFFFFF"/>
        <LinearGradientBrush x:Key="ButtonIconForeground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFB8AA47" Offset="0"/>
            <GradientStop Color="#FFE3E5CE" Offset="1"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="ButtonIconBackground_MouseOver" Color="#FFF8F9F0"/>
        <LinearGradientBrush x:Key="ButtonIconForeground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFFDDDA4" Offset="0"/>
            <GradientStop Color="#FFB6A657" Offset="1"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="ButtonIconBackground_Pressed" Color="#FFFFFFFF"/>
        <Style x:Key="PaneHeader_MenuButtonStyle" TargetType="telerik:RadToggleButton">
            <Setter Property="Width" Value="17"/>
            <Setter Property="Height" Value="17"/>
            <Setter Property="Margin" Value="{StaticResource HeaderButtonMargin}"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadToggleButton">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ForegroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ForegroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ForegroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Pressed}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Pressed}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Telerik_Windows_Controls_Chromes:ButtonChrome x:Name="ButtonChrome" RenderNormal="False" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderChecked="{TemplateBinding IsChecked}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                            <Path x:Name="BackgroundIcon" Data="M0,0 L7,0 7,1 6,1 6,2 5,2 5,3 4,3 4,4 3,4 3,3 2,3 2,2 1,2 1,1 0,1 z" Fill="{StaticResource ButtonIconBackground_Normal}" Height="4" Margin="0 2 0 0" Width="7"/>
                            <Path x:Name="ForegroundIcon" Data="M0,0 L7,0 7,1 6,1 6,2 5,2 5,3 4,3 4,4 3,4 3,3 2,3 2,2 1,2 1,1 0,1 z" Fill="{StaticResource ButtonIconForeground_Normal}" Height="4" Margin="0 1 0 1" Width="7"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="PaneHeader_PinButtonStyle" TargetType="telerik:RadButton">
            <Setter Property="Width" Value="17"/>
            <Setter Property="Height" Value="17"/>
            <Setter Property="Margin" Value="{StaticResource HeaderButtonMargin}"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadButton">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="ForegroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="BackgroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="ForegroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="BackgroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="ForegroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Pressed}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="BackgroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Pressed}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Telerik_Windows_Controls_Chromes:ButtonChrome RenderNormal="False" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                            <Path x:Name="BackgroundIcon" Data="M0,6.5 L7,6.5 M1.5,6.5 L1.5,1.5 L2.5,0.5 L4.5,0.5 L5.5,1.5 L5.5,6.5 M3.5,6.5 L3.5,10 M4.5,6.5 L4.5,0.5" Height="10" Margin="0 2 0 0" Stroke="{StaticResource ButtonIconBackground_Normal}" StrokeThickness="1" Width="7"/>
                            <Path x:Name="ForegroundIcon" Data="M0,6.5 L7,6.5 M1.5,6.5 L1.5,1.5 L2.5,0.5 L4.5,0.5 L5.5,1.5 L5.5,6.5 M3.5,6.5 L3.5,10 M4.5,6.5 L4.5,0.5" Height="10" Margin="0 1 0 1" Stroke="{StaticResource ButtonIconForeground_Normal}" StrokeThickness="1" Width="7"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="PaneHeader_UnPinButtonStyle" TargetType="telerik:RadButton">
            <Setter Property="Width" Value="17"/>
            <Setter Property="Height" Value="17"/>
            <Setter Property="Margin" Value="{StaticResource HeaderButtonMargin}"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadButton">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="ForegroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="BackgroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="ForegroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="BackgroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="ForegroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Pressed}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="BackgroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Pressed}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Telerik_Windows_Controls_Chromes:ButtonChrome RenderNormal="False" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                            <Path x:Name="BackgroundIcon" Data="M3.5,0 L3.5,7 M3.5,1.5 L8.5,1.5 L9.5,2.5 L9.5,4.5 L8.5,5.5 L3.5,5.5 M3.5,3.5 L0,3.5 M3.5,4.5 L9.5,4.5" Height="7" Margin="0 2 0 0" Stroke="{StaticResource ButtonIconBackground_Normal}" StrokeThickness="1" Width="10"/>
                            <Path x:Name="ForegroundIcon" Data="M3.5,0 L3.5,7 M3.5,1.5 L8.5,1.5 L9.5,2.5 L9.5,4.5 L8.5,5.5 L3.5,5.5 M3.5,3.5 L0,3.5 M3.5,4.5 L9.5,4.5" Height="7" Margin="0 1 0 1" Stroke="{StaticResource ButtonIconForeground_Normal}" StrokeThickness="1" Width="10"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="PaneHeader_CloseButtonStyle" TargetType="telerik:RadButton">
            <Setter Property="Width" Value="17"/>
            <Setter Property="Height" Value="17"/>
            <Setter Property="Margin" Value="{StaticResource HeaderButtonMargin}"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadButton">
                        <Grid x:Name="LayoutRoot">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ForegroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ForegroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ForegroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Pressed}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundIcon">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Pressed}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Telerik_Windows_Controls_Chromes:ButtonChrome RenderNormal="False" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                            <Path x:Name="BackgroundIcon" Data="M0,0 L2,0 2,1 3,1 3,2 5,2 5,1 6,1 6,0 8,0 8,1 7,1 7,2 6,2 6,3 5,3 5,4 6,4 6,5 6,5 7,5 7,6 8,6 8,7 6,7 6,6 5,6 5,5 3,5 3,6 2,6 2,7 0,7 0,6 1,6 1,5 2,5 2,4 3,4 3,3 2,3 2,2 1,2 1,1 0,1 Z" Fill="{StaticResource ButtonIconBackground_Normal}" Height="7" Margin="0 2 0 0" Width="8"/>
                            <Path x:Name="ForegroundIcon" Data="M0,0 L2,0 2,1 3,1 3,2 5,2 5,1 6,1 6,0 8,0 8,1 7,1 7,2 6,2 6,3 5,3 5,4 6,4 6,5 6,5 7,5 7,6 8,6 8,7 6,7 6,6 5,6 5,5 3,5 3,6 2,6 2,7 0,7 0,6 1,6 1,5 2,5 2,4 3,4 3,3 2,3 2,2 1,2 1,1 0,1 Z" Fill="{StaticResource ButtonIconForeground_Normal}" Height="7" Margin="0 1 0 1" Width="8"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <CornerRadius x:Key="PaneHeader_CornerRadius">1 1 0 0</CornerRadius>
        <ControlTemplate x:Key="PaneHeaderTemplate" TargetType="telerik:PaneHeader">
            <Border x:Name="Root" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="{StaticResource PaneHeader_CornerRadius}">
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="CommandsMenuStates">
                        <VisualState x:Name="CommandsMenuNormalState"/>
                        <VisualState x:Name="CommandsMenuHiddenState">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="HeaderDropDownMenu">
                                    <DiscreteObjectKeyFrame KeyTime="0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="PinnedStates">
                        <VisualState x:Name="Unpinned">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="HeaderUnPinButton">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible"/>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="HeaderPinButton">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed"/>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Pinned"/>
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="HighlightStates">
                        <VisualState x:Name="NotHighlighted"/>
                        <VisualState x:Name="Highlighted"/>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
                <Grid x:Name="Content">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <ContentControl x:Name="TitleElement" ContentTemplate="{Binding SelectedPane.TitleTemplate, RelativeSource={RelativeSource TemplatedParent}}" Content="{Binding SelectedPane.Title, RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="0" HorizontalContentAlignment="Stretch" Margin="{TemplateBinding Padding}" VerticalAlignment="Center" VerticalContentAlignment="Center"/>
                    <telerik:RadToggleButton x:Name="HeaderDropDownMenu" Grid.Column="1" CommandParameter="{Binding SelectedPane, RelativeSource={RelativeSource TemplatedParent}}" Command="telerikDocking:RadDockingCommands.ContextMenuOpen" IsThreeState="True" Style="{StaticResource PaneHeader_MenuButtonStyle}"/>
                    <Grid Grid.Column="2" Visibility="{Binding SelectedPane.PinButtonVisibility, RelativeSource={RelativeSource TemplatedParent}}">
                        <telerik:RadButton x:Name="HeaderPinButton" CommandParameter="{Binding SelectedPane, RelativeSource={RelativeSource TemplatedParent}}" Command="telerikDocking:RadDockingCommands.Pin" Style="{StaticResource PaneHeader_PinButtonStyle}"/>
                        <telerik:RadButton x:Name="HeaderUnPinButton" CommandParameter="{Binding SelectedPane, RelativeSource={RelativeSource TemplatedParent}}" Command="telerikDocking:RadDockingCommands.Pin" Style="{StaticResource PaneHeader_UnPinButtonStyle}" Visibility="Collapsed"/>
                    </Grid>
                    <telerik:RadButton x:Name="HeaderCloseButton" Grid.Column="3" CommandParameter="{Binding SelectedPane, RelativeSource={RelativeSource TemplatedParent}}" Command="telerikDocking:RadDockingCommands.Close" Style="{StaticResource PaneHeader_CloseButtonStyle}"/>
                </Grid>
            </Border>
        </ControlTemplate>
        <Thickness x:Key="PaneHeader_BorderThickness">0 0 0 1</Thickness>
        <SolidColorBrush x:Key="PaneHeader_BorderBrush" Color="#FFA0A0A0"/>
        <LinearGradientBrush x:Key="PaneHeader_Background" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFEF9526" Offset="0"/>
            <GradientStop Color="#FFF1EBE1" Offset="1"/>
        </LinearGradientBrush>
        <Style TargetType="telerik:PaneHeader">
            <Setter Property="Template" Value="{StaticResource PaneHeaderTemplate}"/>
            <Setter Property="BorderThickness" Value="{StaticResource PaneHeader_BorderThickness}"/>
            <Setter Property="BorderBrush" Value="{StaticResource PaneHeader_BorderBrush}"/>
            <Setter Property="Background" Value="{StaticResource PaneHeader_Background}"/>
            <Setter Property="Padding" Value="3 0"/>
            <Setter Property="telerik:CommandManager.InputBindings">
                <Setter.Value>
                    <telerik:InputBindingCollection>
                        <telerik:MouseBinding Command="telerikDocking:RadDockingCommands.PaneHeaderMenuOpen">
                            <telerik:MouseBinding.Gesture>
                                <telerik:MouseGesture MouseAction="RightClick"/>
                            </telerik:MouseBinding.Gesture>
                        </telerik:MouseBinding>
                    </telerik:InputBindingCollection>
                </Setter.Value>
            </Setter>
        </Style>
    </ResourceDictionary>
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 07 Mar 2011 Link to this post

    Hello Alino,

    What you are doing is to apply a theme to the docking control, but in your custom xaml file (PaneHeaderTheme.xaml) you have only a pahe header style. Therefore no theme can be applied to the docking control, a style for the docking control is simply missing.
     I suggest you generate from Blend all styles for RadDocking and use them in your custom theme to apply any customizations upon the control.


    Regards,
    Dani
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
Back to Top