TextPointer.GetAdjacentElement(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 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.