Class TextPointer
Represents a position within a Rich
Inheritance
Inherited Members
Namespace: System.Windows.Documents
Assembly: OpenSilver.dll
Syntax
public class TextPointer
Properties
| Improve this Doc View SourceIsAtInsertionPosition
Gets a value that indicates whether the current position is an insertion.
Declaration
public bool IsAtInsertionPosition { get; }
Property Value
Type | Description |
---|---|
System. |
true if the current position is an insertion position; otherwise, false. |
LogicalDirection
Gets the logical direction associated with the current position, which is used to disambiguate content associated with the current position.
Declaration
public LogicalDirection LogicalDirection { get; }
Property Value
Type | Description |
---|---|
Logical |
The Logical |
Parent
Gets the logical parent that contains the current position.
Declaration
[NotImplemented]
public DependencyObject Parent { get; }
Property Value
Type | Description |
---|---|
Dependency |
The logical parent that contains the current position. Can return the Rich |
VisualParent
Gets the visual tree parent of the Text
Declaration
public FrameworkElement VisualParent { get; }
Property Value
Type | Description |
---|---|
Framework |
The visual tree parent of the Text |
Methods
| Improve this Doc View SourceCompareTo(TextPointer)
Performs an ordinal comparison between the positions specified by the current
Text
Declaration
public int CompareTo(TextPointer position)
Parameters
Type | Name | Description |
---|---|---|
Text |
position | A Text |
Returns
Type | Description |
---|---|
System. |
-1 if the current Text |
Exceptions
Type | Condition |
---|---|
System. |
position is null. |
System. |
position specifies a position from a different Rich |
GetCharacterRect(LogicalDirection)
Returns a bounding box for content that borders the current Text
Declaration
[NotImplemented]
public Rect GetCharacterRect(LogicalDirection direction)
Parameters
Type | Name | Description |
---|---|---|
Logical |
direction | One of the Logical |
Returns
Type | Description |
---|---|
Rect | A Rect for content that borders the current Text |
GetNextInsertionPosition(LogicalDirection)
Returns a Text
Declaration
public TextPointer GetNextInsertionPosition(LogicalDirection direction)
Parameters
Type | Name | Description |
---|---|---|
Logical |
direction | One of the Logical |
Returns
Type | Description |
---|---|
Text |
A Text |
GetPositionAtOffset(Int32, LogicalDirection)
Returns a Text
Declaration
public TextPointer GetPositionAtOffset(int offset, LogicalDirection direction)
Parameters
Type | Name | Description |
---|---|---|
System. |
offset | An offset, in symbols, for which to calculate and return the position. If the
offset is negative, the returned Text |
Logical |
direction | One of the Logical |
Returns
Type | Description |
---|---|
Text |
A Text |