RadDockingPane Header Backgroung Color

4 posts, 0 answers
  1. Raghu
    Raghu avatar
    3 posts
    Member since:
    Jun 2011

    Posted 06 Jun 2011 Link to this post

    I want to change RadDocumentPane Header Tab Background Color,Is there any Property as Background Property is not Working for me.
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 08 Jun 2011 Link to this post

    Hello Raghu,

    To change the background of the DocumentHost tab you need to generate the RadDocumentPane template from Expression Blend. This will make all brushes related to the button chrome of the tab available. You can use the attached sample as a reference, just open the Resources tab on the right in Blend to spot the brushes that correspond to the proper state of the ButtonChrome.

    Greetings,
    Dani
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Raghu
    Raghu avatar
    3 posts
    Member since:
    Jun 2011

    Posted 08 Jun 2011 Link to this post

    Hi Dani


    I want to change the RadDocumentPane Header Background Color Dynamically at runtime.
    Please Send the code for solving it dynamically.

    Thanks for previous reply

    Thanks
    Raghu
  5. Dani
    Admin
    Dani avatar
    848 posts

    Posted 09 Jun 2011 Link to this post

    Hi Raghu,

    What you can do is to add another visual element in the PaneDocumentHostTemplate. Then, template bind its Background property. For example:

    <ControlTemplate x:Key="PaneDocumentHostTemplate" TargetType="telerik:RadPane">
        <Telerik_Windows_Controls_Chromes:ButtonChrome x:Name="Chrome" ... />
                         <!-- Add one more element: --> 
                         <Border CornerRadius="{StaticResource PaneDocumentHostCornerRadius}"  BorderThickness="1 1 1 0"
                    Background="{TemplateBinding Background}" Margin="0 -1 0 0" />
                         <Telerik_Windows_Controls_Primitives:TabItemContentPresenter  .../>
    </ControlTemplate>

    Then, any Background applied to the DocumentPane will apply to the tab:
    <telerik:RadDocumentPane Header="Document 1" Title="Document 1" Background="Yellow" Style="{StaticResource RadDocumentPaneStyle}" />

    You can use this fact to dynamically change the Background of the DocumentPane and the change will be reflected in the tab background.

    I hope this helps.

    Best wishes,
    Dani
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top