How to remove additional padding from a WPF TextBlock?

前端 未结 3 534
庸人自扰
庸人自扰 2020-12-03 02:42

By default a WPF TextBlock seems to have additional top and bottom padding applied. I wish this wasn\'t so.

  • I\'ve tried setting negative paddin

3条回答
  •  伪装坚强ぢ
    2020-12-03 03:35

    This is probably part of the font which is Segoe UI by default, try Segoe instead for example. (You cannot assign negative padding but you could assign negative Margins, e.g.: Margin="0,-3,0,0")

提交回复
热议问题