Styling for RadPaneHeader

2 posts, 0 answers
  1. Sandeep
    Sandeep avatar
    2 posts
    Member since:
    Mar 2013

    Posted 13 May 2013 Link to this post

                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                        xmlns:Telerik_Windows_Controls_Primitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls.Navigation"
                        >
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="Resources.xaml"/>
      
        </ResourceDictionary.MergedDictionaries>
        <Style TargetType="{x:Type telerik:RadPaneGroup}" x:Key="StandardPaneGroup">
      
            <Setter Property="Background" Value="#1C1C1C"></Setter>
            <Setter Property="BorderBrush" Value="#1C97EA"/>
              
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type telerik:PaneHeader}">
                        <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="true" Height="23">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="25"/>
                            </Grid.ColumnDefinitions>
                              
                        </Grid>
                    </ControlTemplate>
                         
                </Setter.Value
            </Setter>
              
        </Style>
    </ResourceDictionary>

    I am creating an application where it can have the docking functionality. SO I choosed telerik controls for it as it makes my work simple.

    I am facing the issues while setting the styles for Header in the RadPane. I am createing RadPane's dynamically through a click event of a  menu Item.  I want to set a style for RadPane header,border of my own  where I Can use it all over  my application.  I am confused either to write styles for RadPane or RadPane group or PaneHeader.

    Attached file is the sample of my application created using the general WPF controls like Menu, Tabcontrol. Created styles

  2. Masha
    Admin
    Masha avatar
    355 posts

    Posted 16 May 2013 Link to this post

    Hello Sandeep,

    To customize the border area around the content of RadPane, you will have to edit the style of the RadPaneStyle. It has five different control templates depending on the position it occupies in the RadDocikng control.

    <Setter Property="LeftTemplate" Value="{StaticResource PaneTemplate}" />
    <Setter Property="TopTemplate" Value="{StaticResource PaneTemplate}" />
    <Setter Property="RightTemplate" Value="{StaticResource PaneTemplate}" />
    <Setter Property="BottomTemplate" Value="{StaticResource PaneBottomTemplate}" />        
    <Setter Property="DocumentHostTemplate" Value="{StaticResource PaneDocumentHostTemplate}" />

    To reflect changes everywhere you need to modify all the templates. The changes described in previous post was made only for DocumentHostTemplate.

    Hope this helps.

    Kind regards,
    Masha
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top