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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應