แก้ไข

แชร์ผ่าน


TextBlock.BaselineOffset Property

Definition

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.

Applies to