DataGrid row content vertical alignment
Complete solution of this issue at MSDN: Vertical alignment of DataGrid row content. In brief, in style-file set: <!–body content datagrid cell vertical centering–> <Style x:Key=”Body_Content_DataGrid_Centering” TargetType=”{x:Type DataGridCell}”> <Setter Property=”Template”> <Setter.Value> <ControlTemplate TargetType=”{x:Type DataGridCell}”> <Grid Background=”{TemplateBinding Background}”> <ContentPresenter VerticalAlignment=”Center” /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> In window file: <DataGrid x:Name=”ContentDataGrid” Style=”{StaticResource ContentDataGrid}” CellStyle=”{StaticResource Body_Content_DataGrid_Centering}” ItemsSource=”{Binding}” … Read more