Visual.IsAncestorOf(DependencyObject) 方法

定义

确定可视对象是否为后代可视对象的上级。Determines whether the visual object is an ancestor of the descendant visual object.

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 类型的值。A value of type DependencyObject.

返回

如果可视对象是 descendant 的上级,则为 true;否则为 falsetrue if the visual object is an ancestor of descendant; otherwise, false.

适用于