标签具有巨大的行间距导致在 wpf 中相互重叠

labels have huge line spacing causing overlapping each other in wpf

问题:

我有一个 wpf 应用程序,在网格中有一些标签。未设置网格行高

<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="1*"></ColumnDefinition>
        <ColumnDefinition Width="1*"></ColumnDefinition>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition></RowDefinition>
        <RowDefinition></RowDefinition>
        <RowDefinition></RowDefinition>
        <RowDefinition></RowDefinition>
    </Grid.RowDefinitions>
    <Label Content="Created tickets last week:" Grid.Row="0" Grid.Column="0"></Label>
    <Label x:Name="TicketsCreatedLastWeek" Content="0" Grid.Row="0" Grid.Column="1"></Label>
    <Label Content="Target tickets per day:" Grid.Row="1" Grid.Column="0"></Label>
    <Label x:Name="TargetTicketsPerDay" Content="0" Grid.Row="1" Grid.Column="1"></Label>
    <Label Content="Tickets done Today:" Grid.Row="2" Grid.Column="0"></Label>
    <Label x:Name="TicketsDoneToday" Content="0" Grid.Row="2" Grid.Column="1"></Label>
    <Label Content="Day Ticket Progress:" Grid.Row="3" Grid.Column="0"></Label>
    <ProgressBar x:Name="TicketDayProgressbar" Grid.Row="3" Grid.Column="1"></ProgressBar>
</Grid>

在 WPF 应用程序中,它看起来像这样:

重叠本身不是问题。通过扩大表格,一切都正确显示。

我主要担心的是文本周围的巨大空白。没有保证金设置。它似乎是 1 个完整行高。

问题:

有没有办法将行间距减小到 0,这样我就可以根据自己的喜好实际设置格式和放置边距?

标签在其内容周围添加填充(通常为 5)。把它改成任何适合的:

<Label Content="Created tickets last week:" Padding="0" Grid.Row="0" Grid.Column="0"/>