TextBlock.LineHeight Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the height of each line of content.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<TextBlock LineHeight="double"/>
Property Value
Type: System.DoubleThe height of each line in logical pixels. A value of 0 indicates that the line height is determined automatically from the current font characteristics. The default is 0.
| Exception | Condition |
|---|---|
| ArgumentException | LineHeight is set to a non-positive value. |
Dependency property identifier field: LineHeightProperty
Changing this value does not change the height of the associated text. Instead, it changes the height of the line that contains the text. To change the size of the text, use the FontSize property.
The layout of lines in a TextBlock is affected by this property and by the LineStackingStrategy property. This property affects layout only when the LineStackingStrategy property is set to BlockLineHeight.