Επεξεργασία

Κοινή χρήση μέσω


TextPointer.GetAdjacentElement(LogicalDirection) Method

Definition

Returns the element, if any, that borders the current TextPointer in the specified logical direction.

public:
 System::Windows::DependencyObject ^ GetAdjacentElement(System::Windows::Documents::LogicalDirection direction);
public System.Windows.DependencyObject GetAdjacentElement (System.Windows.Documents.LogicalDirection direction);
member this.GetAdjacentElement : System.Windows.Documents.LogicalDirection -> System.Windows.DependencyObject
Public Function GetAdjacentElement (direction As LogicalDirection) As DependencyObject

Parameters

direction
LogicalDirection

One of the LogicalDirection values that specifies the logical direction in which to search for an adjacent element.

Returns

The adjacent element in the specified direction, or null if no adjacent element exists.

Remarks

The returned element is typically a TextElement. A UIElement can be returned when the TextPointer indicates a position inside a BlockUIContainer element or an InlineUIContainer element.

Applies to

See also