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

4 posts, 0 answers
  1. Sherry
    Sherry avatar
    15 posts
    Member since:
    May 2014

    Posted 16 Dec 2016 Link to this post

    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

  2. Martin
    Admin
    Martin avatar
    72 posts

    Posted 21 Dec 2016 Link to this post

    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.
  3. Sherry
    Sherry avatar
    15 posts
    Member since:
    May 2014

    Posted 21 Dec 2016 in reply to Martin Link to this post

    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

  4. Martin
    Admin
    Martin avatar
    72 posts

    Posted 23 Dec 2016 Link to this post

    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.
Back to Top