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、または が の ItemsControlによってItemsPresenter作成されたパネルである場合elementは がItemsControl返されます。それ以外の場合nullは が返trueされます。element

適用対象