TextLineBounds 列舉

定義

影響計算線條方塊高度的方式

public enum class TextLineBounds
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class TextLineBounds
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum TextLineBounds
Public Enum TextLineBounds
繼承
TextLineBounds
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

欄位

Full 0

使用一般線條方塊高度計算,這是預設值。

Tight 3

行框高度的頂端是字型的上限高度,行框高度的底端是文字基準。

TrimToBaseline 2

行框高度的底端是文字基準。

TrimToCapHeight 1

行框高度的頂端是字型的上限高度。

備註

TextLineBounds 值如何影響相鄰線條的線條高度計算,最好是透過圖例來顯示。 每個值的第一個圖例會顯示單行,而第二個則顯示兩條連續的線條及其界限。

  • 黃色區域代表 TextBlock 外部界限以外的區域,因此,如果有連續的內容 (文字或) ,則會遮罩。
  • 紅色線條是文字上限高度,文字遞增可能會高於此高度。 圖例中的大寫 「Â」 字元具有遞增。
  • 綠色線條是文字基準,文字下階可能會低於此基準。 圖例中的小寫 「j」 字元具有子代。

完整

套用至文字行的 TextLineBounds Full 值圖例,其中指出基準和上限高度。套用至兩行文字之 TextLineBounds 的完整值圖例,其中顯示行之間的間距。

TrimToCapHeight

TextLineBounds 的 TrimToCapHeight 值圖例套用至文字行,並指出基準和上限高度TextLineBounds 的 TrimToCapHeight 值圖例套用至兩行文字,其中顯示行之間的間距。

TrimToBaseline

TextLineBounds 的 TrimToBaseline 值圖例套用至文字行,並指出基準和上限高度TextLineBounds 的 TrimToBaseline 值圖例套用至兩行文字,其中顯示行之間的間距。

套用至文字行的 TextLineBounds 緊密值圖例,其中指出基準和上限高度套用至兩行文字之 TextLineBounds 的緊密值圖例,其中顯示行之間的間距。

請注意,在 緊密 對齊中,如果有任何遞增或下階,字元會重迭。 特別是當不同的字元行使用相同的 Foreground 值時,重迭可能會對可讀性造成負面影響。

適用於