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 所包含的任何額外內容或專案不會算作符號。
一個 16 位元的 Unicode 字元,置於文字 Run 元素中。