标签:vertica 需要 lte style present back 标题 body idc
如果用DataGridTextColumn作为DataGrid的列,字体垂直居中需要这样设置:
<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>
标题水平居中这样设置:
<Style TargetType="DataGridColumnHeader"> <Setter Property="HorizontalContentAlignment" Value="Center"/> </Style>
标签:vertica 需要 lte style present back 标题 body idc
原文地址:https://www.cnblogs.com/iDream2018/p/12378334.html