如何在xaml标签中调整填充

Bja*_*rne 5 xaml label padding

如何在下面的标签中使顶部和底部填充更小?在我看来,边界框比它需要的大得多,但填充设置为0,所以它不能更小.

<Label Background="AliceBlue" Content="1800" FontSize="170" FontWeight="Bold" Foreground="Gray" Padding="0" />
Run Code Online (Sandbox Code Playgroud)

Bry*_*yan 2

XAML 中不存在填充FrameworkElement。使用保证金。

填充可以应用于三个元素:BlockBorderControl因为这些元素具有外边缘。