Visual.IsAncestorOf(DependencyObject) 方法

定义

确定可视对象是否为后代可视对象的上级。

public:
 bool IsAncestorOf(System::Windows::DependencyObject ^ descendant);
public bool IsAncestorOf (System.Windows.DependencyObject descendant);
member this.IsAncestorOf : System.Windows.DependencyObject -> bool
Public Function IsAncestorOf (descendant As DependencyObject) As Boolean

参数

descendant
DependencyObject

一个 DependencyObject 类型的值。

返回

如果可视对象是 descendant 的上级,则为 true;否则为 false

适用于