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.
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
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.