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

Styling for RadPaneHeader

1 Answer 91 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Sandeep
Top achievements
Rank 1
Sandeep asked on 13 May 2013, 07:23 PM
                    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

1 Answer, 1 is accepted

Sort by
0
Masha
Telerik team
answered on 16 May 2013, 11:16 AM
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.

Tags
Docking
Asked by
Sandeep
Top achievements
Rank 1
Answers by
Masha
Telerik team
Share this question
or