TextPointer 類別

定義

表示文字專案內的位置。

public ref class TextPointer sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class TextPointer final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class TextPointer
Public NotInheritable Class TextPointer
繼承
Object Platform::Object IInspectable TextPointer
屬性

屬性

LogicalDirection

取得與目前位置相關聯的邏輯方向,用來厘清與目前位置相關聯的內容。

Offset

取得其容器內 TextPointer 的字元索引。

Parent

取得包含目前位置的邏輯父代。

VisualParent

取得使用者介面 (UI) 專案,該元素會「擁有」這個 TextPointer

方法

GetCharacterRect(LogicalDirection)

傳回內容周框方塊,此方塊會以指定的邏輯方向框線目前 TextPointer

GetPositionAtOffset(Int32, LogicalDirection)

TextPointer 傳回指定位移所指示的位置,以符號表示,從目前 TextPointer 的開頭和指定的方向。

適用於