[ACCEPTED]-Change background color of header in WPF expander-expander

Accepted answer
Score: 13

here you go, this should do the trick.... You 2 should set the width of the header template 1 to the width of the expander.

<Expander Name="expOneDay" 
          HorizontalAlignment="Stretch"
          HorizontalContentAlignment="Stretch" Width="Auto">
     <Expander.Header >
          <Border Background="Bisque">
               <TextBlock Foreground="White" Text="Steve" 
                          Width="{Binding ElementName=expOneDay, Path=ActualWidth}"
                          HorizontalAlignment="Stretch" />
          </Border>
     </Expander.Header>
</Expander>

More Related questions