This topic has not yet been rated - Rate this topic

ItemsControl.ItemsControlFromItemContainer Method

April 12, 2014

Returns the ItemsControl that owns the specified container element.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
public static ItemsControl ItemsControlFromItemContainer(
	DependencyObject container
)

Parameters

container
Type: System.Windows.DependencyObject
The container element to return the ItemsControl for.

Return Value

Type: System.Windows.Controls.ItemsControl
The ItemsControl that owns the specified container element; otherwise, null. The ItemsControlFromItemContainer method returns null if container is not a UIElement or the parent is not an ItemsControl.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.