How can I make a WPF Expander Stretch?

All you need to do is this: <Expander> <Expander.Header> <TextBlock Text=”I am header text…” Background=”Blue” Width=”{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Expander}}, Path=ActualWidth}” /> </Expander.Header> <TextBlock Background=”Red”> I am some content… </TextBlock> </Expander> Stretching Content in an Expander Header

How to style a WPF Expander Header?

I have combined some XAML from Josh Smith and MSDN and came up with a solution. Indeed, the control (al least the header) must be retemplated. <Page xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” Width=”400″> <StackPanel> <StackPanel.Resources> <Style TargetType=”Border” x:Key=”RacePitBorderStyle” > <Style.Resources> <LinearGradientBrush x:Key=”BackBrush” StartPoint=”0.5,0″ EndPoint=”0.5,1″> <GradientStop Color=”#EF3132″ Offset=”0.1″ /> <GradientStop Color=”#D62B2B” Offset=”0.9″ /> </LinearGradientBrush> </Style.Resources> <Setter Property=”Background” Value=”{StaticResource BackBrush}”/> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)