Search This Blog

Sunday, January 19, 2014

How to remove extra padding from a WPF TextBlock?

IN CS file :
textBlock.LineStackingStrategy = LineStackingStrategy.BlockLineHeight;
textBlock.LineHeight = 20 ;

if we want this in XAML.cs :