TextBlock.BaselineOffset Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the amount by which each line of text is offset from the baseline.
public:
property double BaselineOffset { double get(); void set(double value); };
public double BaselineOffset { get; set; }
member this.BaselineOffset : double with get, set
Public Property BaselineOffset As Double
Property Value
The amount by which each line of text is offset from the baseline, in device independent pixels. NaN indicates that an optimal baseline offset is automatically calculated from the current font characteristics. The default is NaN.
Remarks
The baseline is the imaginary horizontal line with which the base of each character in a line of text is aligned.
This dependency property also has an attached property usage. In XAML, the usage is <object TextBlock.BaselineOffset="double".../>
, where object is an object element (typically a flow element) contained within a TextBlock. In code, the attached property usage is supported by GetBaselineOffset and SetBaselineOffset.