Visual.IsAncestorOf(DependencyObject) Method

Definition

确定可视对象是否为后代可视对象的上级。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

Parameters

descendant
DependencyObject

一个 DependencyObject 类型的值。A value of type DependencyObject.

Returns

Boolean

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

Applies to