Styling Columns

<controls:DataGridTextColumn  >
    <controls:DataGridTextColumn.HeaderStyle>
        <Style TargetType="prim:DataGridColumnHeader">
            <Style.Setters>
                <Setter Property="HorizontalContentAlignment" Value="Center"/>
                <Setter Property="MinWidth" Value="100" />
                <Setter Property="FontWeight" Value="Bold"/>
            </Style.Setters>
        </Style>
    </controls:DataGridTextColumn.HeaderStyle>
    <controls:DataGridTextColumn.CellStyle>
        <Style TargetType="controls:DataGridCell">
            <Style.Setters>
                <Setter Property="HorizontalAlignment" Value="Right"/>
            </Style.Setters>
        </Style>
    </controls:DataGridTextColumn.CellStyle>
</controls:DataGridTextColumn>

Text Align

<controls:DataGridTextColumn  >
    <controls:DataGridTextColumn.CellStyle>
        <Style TargetType="controls:DataGridCell">
            <Style.Setters>
                <Setter Property="HorizontalAlignment" Value="Right"/>
            </Style.Setters>
        </Style>
    </controls:DataGridTextColumn.CellStyle>
</controls:DataGridTextColumn>
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published. Required fields are marked *