ItemsControl.GetItemsOwner(DependencyObject) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳該元素所承載物品的 。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