TextBlock.BaselineOffset Property

Definition

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

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

Property Value

Double

double

The amount by which each line of text is offset from the baseline, in device independent pixels. The default is NaN. See Remarks below.

Remarks

If the BaselineOffset is NaN, then an optimal baseline offset is automatically calculated from the current font characteristics.

Note

In C#, you can obtain NaN from Double.NaN.

In C++, you can obtain NaN by using the NAN macro or std::numeric_limits<double>::quiet_NaN().

Do not use the == operator to test for NaN.

In C#, use Double.IsNaN() to test for NaN.

In C++, use isnan() to test for NaN.

Applies to