Returns the ItemsControl that the specified element hosts items for.
Assembly: System.Windows (in System.Windows.dll)
'Declaration Public Shared Function GetItemsOwner ( _ element As DependencyObject _ ) As ItemsControl
public static ItemsControl GetItemsOwner( DependencyObject element )
The host element.
If the IsItemsHost property is set to true on element in a style or if element is a panel created by the ItemsPresenter for an ItemsControl, the associated ItemsControl is returned; otherwise, the GetItemsOwner method returns nulla null reference (Nothing in Visual Basic).
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.