I have a wpf application with some labels in a Grid. The Grid Row height is not set
<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>
within the WPF Application, it looks like this:
The overlapping itself is not the issue. By making the form bigger, everything shows up correctly.
My main concern is the huge margin around the text. There is no margin set. It appears to be 1 full line height.
Is there a way to reduce line spacing to 0, so that I can actually format and put margin as I please?
Label adds Padding around its Content (usually 5). Change it to whatever suits:
<Label Content="Created tickets last week:" Padding="0" Grid.Row="0" Grid.Column="0"/>