ITextCharacterFormat 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
定義文件的預設字元格式屬性,或文字範圍目前的字元格式屬性。
public interface class ITextCharacterFormat
/// [Windows.Foundation.Metadata.Guid(4117823568, 39141, 22408, 177, 227, 50, 25, 30, 235, 249, 77)]
/// [Windows.Foundation.Metadata.Version(1)]
struct ITextCharacterFormat
/// [Windows.Foundation.Metadata.Guid(4117823568, 39141, 22408, 177, 227, 50, 25, 30, 235, 249, 77)]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Text.TextApiContract, 65536)]
struct ITextCharacterFormat
[Windows.Foundation.Metadata.Guid(4117823568, 39141, 22408, 177, 227, 50, 25, 30, 235, 249, 77)]
[Windows.Foundation.Metadata.Version(1)]
public interface ITextCharacterFormat
[Windows.Foundation.Metadata.Guid(4117823568, 39141, 22408, 177, 227, 50, 25, 30, 235, 249, 77)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Text.TextApiContract), 65536)]
public interface ITextCharacterFormat
Public Interface ITextCharacterFormat
- 屬性
屬性
| 名稱 | Description |
|---|---|
| AllCaps |
無論所有字元都是大寫字母,都必須取得或集合。 |
| BackgroundColor |
取得或設定文字背景(highlight)顏色。 |
| Bold |
無論角色大膽,都要設定。 |
| FontStretch |
設定字型相較於正常長寬比的拉伸程度。 |
| FontStyle |
取得或設定字型樣式,例如一般或斜體。 |
| ForegroundColor |
設定或設定前景或文字顏色。 |
| Hidden |
是否隱藏角色。 |
| Italic |
無論字元是否用斜體字,都能取得或設定。 |
| Kerning |
取得或設定字體大小,字距調整的最小大小。 |
| LanguageTag |
取得或設定網際網路工程任務小組(IETF)語言標籤(BCP 47標準),用以識別目前與字元相關的語言。 |
| LinkType |
會取得文字的連結類型。 |
| Name |
它會取得或設定字型名稱。 |
| Outline |
無論字元是否以輪廓字元顯示,都需取得或集合。 |
| Position |
取得或設定字元相對於基準線的偏移。 |
| ProtectedText |
是否會保護字元免受修改的嘗試。 |
| Size |
它負責取得或設定字型大小。 |
| SmallCaps |
無論字元是否使用小寫大寫字母,都需取得或設定。 |
| Spacing |
設定或設定角色間的水平間距。 |
| Strikethrough |
以橫線穿過中央,決定字元是否顯示。 |
| Subscript |
取得或設定字元是否以下標顯示。 |
| Superscript |
取得或集合,取決於字元是否以上標方式顯示。 |
| TextScript |
取得或設定角色組合。 |
| Underline |
設定角色使用的底線類型。 |
| Weight |
它能設定字元的字體粗細。 |
方法
| 名稱 | Description |
|---|---|
| GetClone() |
建立一個與此字元格式物件相同的新物件。 |
| IsEqual(ITextCharacterFormat) |
判斷此字元格式物件是否與指定的字元格式物件具有相同的屬性。 |
| SetClone(ITextCharacterFormat) |
透過複製另一個文字字元格式化物件來設定字元格式。 |