TextPointer.GetTextRunLength(LogicalDirection) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the number of Unicode characters between the current TextPointer and the next non-text symbol, in the specified logical direction.
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
Parameters
- direction
- LogicalDirection
One of the LogicalDirection values that specifies the logical direction in which to count the number of characters.
Returns
The number of Unicode characters between the current TextPointer and the next non-text symbol. This number may be 0 if there is no adjacent text.
Remarks
Any of the following is considered to be a symbol:
An opening or closing tag for the TextElement element.
A UIElement element contained in an InlineUIContainer or BlockUIContainer. Note that such a UIElement is always counted as exactly one symbol; any additional content or elements contained by the UIElement are not counted as symbols.
A 16-bit Unicode character inside of a text Run element.
Applies to
.NET