Visual.IsDescendantOf(DependencyObject) 方法

定义

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

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

参数

ancestor
DependencyObject

一个 DependencyObject 类型的值。

返回

Boolean

如果可视对象是 ancestor 的后代,则为 true;否则为 false

适用于