TextPointer.GetTextRunLength(LogicalDirection) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回当前 TextPointer 与下一个非文本符号之间的 Unicode 字符数,以指定的逻辑方向返回。
public:
int GetTextRunLength(System::Windows::Documents::LogicalDirection direction);
public int GetTextRunLength(System.Windows.Documents.LogicalDirection direction);
member this.GetTextRunLength : System.Windows.Documents.LogicalDirection -> int
Public Function GetTextRunLength (direction As LogicalDirection) As Integer
参数
- direction
- LogicalDirection
其中 LogicalDirection 一个值指定要对字符数进行计数的逻辑方向。
返回
当前 TextPointer 符号和下一个非文本符号之间的 Unicode 字符数。 如果没有相邻文本,则此数字可能为 0。
注解
以下任一项都被视为符号:
元素的 TextElement 开始或结束标记。
UIElement包含在或 InlineUIContainerBlockUIContainer. 中的元素。 请注意,此类 UIElement 始终计为一个符号;UIElement 包含的任何其他内容或元素不计为符号。
文本 Run 元素内的 16 位 Unicode 字符。