RichTextBox.BaselineOffset Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets a value that represents the offset in pixels from the top of the content to the baseline of the first paragraph. The baseline of the paragraph is the baseline of the first line in it.

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

Syntax

'Declaration
Public ReadOnly Property BaselineOffset As Double
public double BaselineOffset { get; }

Property Value

Type: System.Double
The computed baseline for the first paragraph, or 0 if the RichTextBox is empty.

Remarks

The baseline is the imaginary horizontal line that the base of each character of text is aligned. The baseline offset is the distance from the top of the control to the baseline. When embedded elements are present, their baselines are aligned with the text baseline. The baseline for all elements is their height, except for TextBlock, TextBox and RichTextBox. As a result, embedded text elements are aligned at their bottom to the text baseline, except text controls/elements

Version Information

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

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