我期望网格中同一行上的两种不同字体样式在网格行的底部对齐,但如您所见,它没有发生!
有人看到我需要改变什么吗?
干杯,
绿柱石
问题
网格
<Grid ShowGridLines="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0" Style="{StaticResource SubjectStyle}" .../>
...
<TextBlock Grid.Column="2" Grid.Row="0" Style="{StaticResource DisplayNameStyle}" .../>
...
</Grid>
主题风格
<Style x:Key="SubjectStyle" TargetType="{x:Type Label}">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="10" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Bottom" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="Width" Value="75" />
</Style>
显示名称样式
<Style x:Key="DisplayNameStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="16" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="MinWidth" Value="75" />
</Style>