How can I make the top and bottom padding smaller in the following label? As I see it, the bounding box in much bigger than it needs to be, but the padding is set to 0, so it cannot be any smaller.
<Label Background="AliceBlue" Content="1800" FontSize="170" FontWeight="Bold" Foreground="Gray" Padding="0" />
You can use Margin.
With margin you can set the amount you want to go left, right, top, bottom
by this I mean Margin="0,0,0,0"
that means. you have none what so ever.
it goes by the following: Margin ="left, top, right, bottom
so if I have margin ="2,5,3,5"
it means I have a margin 2 pixels in from the left, 5 pixels in from the top, 3 pixels from the right and 5 pixels up from the bottom.
Having just hit this where a border was around the label I set a negative margin.
<Border BorderBrush="Black" BorderThickness="1">
<Label Margin="-5" Content="Unable to report/>
</Border>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With