TextPointer.GetAdjacentElement(LogicalDirection) 方法

定义

返回以指定逻辑方向与当前 TextPointer 边框的元素(如果有)。

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

参数

direction
LogicalDirection

其中 LogicalDirection 一个值指定要在其中搜索相邻元素的逻辑方向。

返回

指定 direction中的相邻元素,或者 null 不存在相邻元素。

注解

返回的元素通常是一个 TextElement。 当指示元素或元素内UIElement的位置时TextPointer,可以返回 ABlockUIContainerInlineUIContainer

适用于

另请参阅