Share via


TextPointer.DocumentStart 属性

定义

获取一个 TextPointer,它指向文本容器中与当前位置相关联的内容的开始位置。

public:
 property System::Windows::Documents::TextPointer ^ DocumentStart { System::Windows::Documents::TextPointer ^ get(); };
public System.Windows.Documents.TextPointer DocumentStart { get; }
member this.DocumentStart : System.Windows.Documents.TextPointer
Public ReadOnly Property DocumentStart As TextPointer

属性值

一个 TextPointer,它指向文本容器中与当前位置相关联的内容的开始位置。

注解

使用此属性返回的位置作为基线位置,从该位置处理与其他位置的相对偏移量。 和 GetOffsetToPositionGetPositionAtOffset 方法提供了一种在位置和位置偏移之间平移的方法。

Parent返回的 TextPointer 始终是文本容器 (TextBlockFlowDocument) ,而不是 TextElement

适用于

另请参阅