語言

ItemsControl.GetItemsOwner(DependencyObject) 方法

定義

回傳該元素所承載物品的 。ItemsControl

public:
 static System::Windows::Controls::ItemsControl ^ GetItemsOwner(System::Windows::DependencyObject ^ element);
public static System.Windows.Controls.ItemsControl GetItemsOwner(System.Windows.DependencyObject element);
static member GetItemsOwner : System.Windows.DependencyObject -> System.Windows.Controls.ItemsControl
Public Shared Function GetItemsOwner (element As DependencyObject) As ItemsControl

參數

element
DependencyObject

宿主元素。

傳回

該 ItemsControl 指定元素承載 ,或 null。

備註

若 IsItemsHost 在某樣式中被設定為 true ,element或 element 是由 ItemsPresenter 為 ItemsControl所建立的面板,則ItemsControl返回;否則,。 null

適用於