TextBlock.BaselineOffset Property


Returns a value by which each line of text is offset from a baseline.

Equivalent WinUI property: Microsoft.UI.Xaml.Controls.TextBlock.BaselineOffset.

 property double BaselineOffset { double get(); };
double BaselineOffset();
public double BaselineOffset { get; }
var double = textBlock.baselineOffset;
Public ReadOnly Property BaselineOffset As Double

Property Value


The amount by which each line of text is offset from the baseline, in device independent pixels. System.Double.NaN indicates that an optimal baseline offset is automatically calculated from the current font characteristics. The default is System.Double.NaN.



Visual C++ component extensions (C++/CX) doesn't have a constant for NaN, it uses a value, which appears as "-1.#IND" followed by zeros.

Applies to