ItemContainerGenerator.ContainerFromItem(Object) 方法

定义

注意

ContainerFromItem 在Windows 8.1后可能会更改或不可用于发布。 请改用 ItemsControl.ContainerFromItem

返回与指定项对应的容器。

public:
 virtual DependencyObject ^ ContainerFromItem(Platform::Object ^ item) = ContainerFromItem;
/// [Windows.Foundation.Metadata.Deprecated("ContainerFromItem may be altered or unavailable for releases after Windows 8.1. Instead, use ItemsControl.ContainerFromItem.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Microsoft.UI.Xaml.WinUIContract")]
DependencyObject ContainerFromItem(IInspectable const& item);
[Windows.Foundation.Metadata.Deprecated("ContainerFromItem may be altered or unavailable for releases after Windows 8.1. Instead, use ItemsControl.ContainerFromItem.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Microsoft.UI.Xaml.WinUIContract")]
public DependencyObject ContainerFromItem(object item);
function containerFromItem(item)
Public Function ContainerFromItem (item As Object) As DependencyObject

参数

item
Object

Platform::Object

IInspectable

要为其检索容器的项。

返回

一个对应于指定项的容器(如果该项具有容器且存在于集合中);否则为 null

属性

适用于