ITextDocument 介面

定義

提供檔內容的存取權、提供將檔載入並儲存到資料流程、擷取文字範圍、取得使用中選取範圍、設定預設格式屬性等的方式。

public interface class ITextDocument
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(3203288539, 37042, 16524, 162, 246, 10, 10, 195, 30, 51, 228)]
struct ITextDocument
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(3203288539, 37042, 16524, 162, 246, 10, 10, 195, 30, 51, 228)]
public interface ITextDocument
Public Interface ITextDocument
衍生
屬性

Windows 需求

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

屬性

CaretType

取得或設定插入號類型。

DefaultTabStop

取得或設定預設索引標籤間距。

Selection

取得使用中的文字選取範圍。

UndoLimit

取得或設定可儲存在復原佇列中的動作數目上限。

方法

ApplyDisplayUpdates()

遞減內部計數器,控制文字更新是否立即顯示或批次。

BatchDisplayUpdates()

遞增內部計數器,控制文字更新是否立即顯示或批次。

BeginUndoGroup()

開啟復原群組。

CanCopy()

判斷是否可以將檔內容複寫到剪貼簿。

CanPaste()

判斷剪貼簿是否有可貼到檔中的內容。

CanRedo()

判斷是否有一或多個重做作業存在。

CanUndo()

判斷是否有一或多個復原作業存在。

EndUndoGroup()

關閉復原群組。

GetDefaultCharacterFormat()

擷取檔的預設字元格式設定屬性。

GetDefaultParagraphFormat()

擷取檔的預設段落格式設定屬性。

GetRange(Int32, Int32)

擷取檔使用中本文的新文字範圍。

GetRangeFromPoint(Point, PointOptions)

擷取 (空白) 文字範圍或最接近畫面上特定點的變質。

GetText(TextGetOptions, String)

取得使用中本文中的文字 (檔) 。

LoadFromStream(TextSetOptions, IRandomAccessStream)

從資料流程載入檔。

Redo()

反轉最近的復原作業。

SaveToStream(TextGetOptions, IRandomAccessStream)

將檔儲存至資料流程。

SetDefaultCharacterFormat(ITextCharacterFormat)

設定檔的預設字元格式設定屬性。

SetDefaultParagraphFormat(ITextParagraphFormat)

設定檔的預設段落格式設定屬性。

SetText(TextSetOptions, String)

設定檔的文字。

Undo()

復原最新的復原群組。

適用於