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

Hto define a new style for the RadPaneHeader to be applied for only one RadPane?

3 Answers 39 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Sherry
Top achievements
Rank 1
Sherry asked on 16 Dec 2016, 12:05 PM

Hi,

I have multiple Radpanes in a Window, but I want to change the header of only one RadPane. How do I do it?

I can only see this

<Style TargetType="dock:PaneHeader" BasedOn="{StaticResource PaneHeaderStyle}">

But this then modifies all my pane. So could you please give me another solution?

 

Thanks

 

Sherry

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 21 Dec 2016, 08:50 AM
Hello Sherry,

You could add the Style as it is right now to the resources of the RadPaneGroup, so it would apply only to those kind of elements in it:
<dock:RadPaneGroup ....>
  <dock:RadPaneGroup.Resources>
    <Style TargetType="dock:PaneHeader" BasedOn="{StaticResource PaneHeaderStyle}">
    ...
    </Style>
  </dock:RadPaneGroup.Resources>
</dock:RadPaneGroup>

An alternative is to define a Style for the concrete RadPaneGroup, basing it on the default one and define the style for the header in the Style.Resources in a similar manner.

Regards,
Martin
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Sherry
Top achievements
Rank 1
answered on 21 Dec 2016, 08:52 AM

Hello Martin,

I tried that already (your first suggestion), but then the style was being applied only after I pin the Pane not for the pop up pane.

Do you have an example on how to do it?

Thanks

Sherry

0
Martin
Telerik team
answered on 23 Dec 2016, 02:53 PM
Hi Sherry,

When it is not docked - it is moved to a ToolWindow and that is why the style in the resources for the RadPaneGroup is not applied and therefore the header is shown with its default style. You can review the following SDK example about setting custom styles for the ToolWindow when a RadPane or RadPaneGroup is undocked. You can also try our SDK browser to review the examples more easily.

Regards,
Martin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Docking
Asked by
Sherry
Top achievements
Rank 1
Answers by
Martin
Telerik team
Sherry
Top achievements
Rank 1
Share this question
or