FormattedText.Extent 屬性

定義

取得從第一行的最頂端繪製像素到最後一行的最底端繪製像素的距離。Gets the distance from the topmost drawn pixel of the first line to the bottommost drawn pixel of the last line.

public:
 property double Extent { double get(); };
public double Extent { get; }
member this.Extent : double
Public ReadOnly Property Extent As Double

屬性值

Double

從繪製在第一行最頂端的像素到繪製在最後一行最底端之像素的距離 (以裝置獨立單位 (每單位 1/96 英吋)device-independent units (1/96th inch per unit) 提供)。The distance from the topmost drawn pixel of the first line to the bottommost drawn pixel of the last line, provided in 裝置獨立單位 (每單位 1/96 英吋)device-independent units (1/96th inch per unit).

備註

範圍會併入可能出現在圖像中的任何圖形元素,包括可能超出行高、基準或 overhangs 的裝飾元素。Extent incorporates any graphical elements that might be present in a glyph, including decorative elements that might go outside the line height, baseline, or overhangs. 此值取決於行上出現的字元,因此不 (使用,而且不應該用) 來衍生行間距。This value is dependent on characters appearing on the line and is thus not used (and should not be used) to derive line spacing. 不過,它可以用來將段落的頂端或底部對齊圖形元素,或用於點擊測試。It can however be used to align the top or bottom of paragraphs with graphical elements, or for hit-testing.

適用於