This project is read-only.

change datagrid DataGridColumnHeader

Jul 31, 2013 at 10:55 AM
Edited Jul 31, 2013 at 5:49 PM
when i want to change DataGridColumnHeader horizantal alignment with this code the modernui style is changing to windows style!!!
i writed this code on app.xaml file.
how can i change the value of modernui style?!
            <Style TargetType="DataGridColumnHeader">
            <Setter Property="HorizontalAlignment" Value="Stretch">
            </Setter>        
            </Style>
Jul 31, 2013 at 4:30 PM
Add a BasedOn="{StaticResource {x:Type DataGridColumnHeader}}" to the Style element.
Jul 31, 2013 at 5:49 PM
it doesn't work.
Aug 1, 2013 at 3:21 PM
I do this, and it works perfectly.:
        <Style x:Key="headerStyle"
               TargetType="{x:Type DataGridColumnHeader}"
               BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        </Style>