We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to set the header Background color on a specific MDI child in DocumentContainer ?

In DocumentContainer, set the header’s background color on a specific MDIchild using DocumentMDIHeaderStyle property.



<Style x:Key="headerstyle" TargetType="syncfusion:DocumentHeader">

      <Setter Property="Header" Value="syncfusion:DocumentHeader.Header"/>

        <Setter Property="Background">


                    <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">

                        <GradientStop Color="#FFD9EDFF" Offset="0"/>

                        <GradientStop Color="#FFC0DEFF" Offset="0.445"/>

                        <GradientStop Color="#FFAFD1F8" Offset="0.53"/>






<syncfusion:DocumentContainer x:Name="Doccontainer" Mode="MDI">

            <ContentControl x:Name="child1" syncfusion:DocumentContainer.Header="Document1" syncfusion:DocumentContainer.DocumentMDIHeaderStyle="{StaticResource headerstyle}">


            <ContentControl x:Name="child2" syncfusion:DocumentContainer.Header="Document2">

                <TextBlock Text="This is a document2"/>


            <ContentControl x:Name="child3" syncfusion:DocumentContainer.Header="Document3"/>



Style style = this.FindResource("headerstyle") as Style;

child1.SetValue(DocumentContainer.DocumentMDIHeaderStyleProperty, style);

The following screenshot displays the setting of the header background color on a specific MDIchild,

Figure 1: Output

Article ID: Published Date: Last Revised Date: Platform: Control:
3647 01/30/2015 01/30/2015 WPF DocumentContainer
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.