ContainerVisual.Parent 屬性

定義

取得 Visual 的父 ContainerVisual

public:
 property System::Windows::DependencyObject ^ Parent { System::Windows::DependencyObject ^ get(); };
public System.Windows.DependencyObject Parent { get; }
member this.Parent : System.Windows.DependencyObject
Public ReadOnly Property Parent As DependencyObject

屬性值

DependencyObject

視覺物件的父代。

備註

請注意,這會傳回為 DependencyObject ,而不是原始物件。

此屬性可能會在中斷連線的樹狀結構中傳回 null ,或者如果您已周遊至視窗層級的樹狀目錄根目錄,

適用於