Share via


TextBlock.SelectionEnd 属性

定义

获取 TextBlock 中所选文本的结束位置。

public:
 property TextPointer ^ SelectionEnd { TextPointer ^ get(); };
TextPointer SelectionEnd();
public TextPointer SelectionEnd { get; }
var textPointer = textBlock.selectionEnd;
Public ReadOnly Property SelectionEnd As TextPointer

属性值

表示选择结束的 对象;如果没有选择,则为 null。

注解

使用 “选择” 设置选择的开始和结束。

重要

如果使用键盘在 TextBlock 中进行文本选择,用户必须先在前台使用应用激活 插入点浏览 (,然后按 F7) 。

适用于