ItemContainerGenerator::IndexFromContainer Method (DependencyObject^)
.NET Framework (current version)
Returns the index to an item that corresponds to the specified, generated UIElement.
Assembly: PresentationFramework (in PresentationFramework.dll)
Parameters
- container
-
Type:
System.Windows::DependencyObject^
The DependencyObject that corresponds to the item to the index to be returned.
Return Value
Type: System::Int32An Int32 index to an item that corresponds to the specified, generated UIElement or -1 if container is not found.
| Exception | Condition |
|---|---|
| ArgumentException | container is null. |
Calling this method is identical to calling the ItemContainerGenerator::IndexFromContainer(DependencyObject^, Boolean) method and passing false to the returnLocalIndex parameter.
.NET Framework
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Show: