Horizontal aligment WPF expander header
问题 I want to show my GroupName on left and button "ShowOnly" on the right of header row. I tried with this code but doesn't works. Could anyone help me? Thx My code : <Expander IsExpanded="True" > <Expander.Header> <DockPanel HorizontalAlignment="Stretch"> <TextBlock Text="{Binding Path=Name}" FontSize="18"></TextBlock> <Button Style="{StaticResource ButtonStyle}" Content="Show Only" HorizontalAlignment="Right" Padding="15,0,15,0" Click="Button_Click"></Button> </DockPanel> </Expander.Header>