Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TextBox.LineHeight Property

Silverlight

Gets or sets the height of each line of content.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

public double LineHeight { get; set; }

Property Value

Type: System.Double
The height of each line in pixels. A value of 0 indicates that the line height is determined automatically from the current font characteristics. The default is 0.

ExceptionCondition
ArgumentException

LineHeight is set to a non-positive value.

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 TextBox is affected by this property and by the LineStackingStrategy property. This property is used to set the height of each line containing text when LineStackingStrategy property is set to BlockLineHeight or BaselineToBaseline. When LineStackingStrategy property is set to MaxHeight, the larger of calculated LineHeight or set value of LineHeight property is set as the LineHeight.

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

Show:
© 2015 Microsoft