共用方式為


ItemContainerGenerator.ContainerFromItem(Object) 方法

定義

注意

Windows 8.1之後,可能會變更或無法使用 ContainerFromItem。 請改用 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, Windows.Foundation.UniversalApiContract)]
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, "Windows.Foundation.UniversalApiContract")]
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, typeof(Windows.Foundation.UniversalApiContract))]
public DependencyObject ContainerFromItem(object 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, "Windows.Foundation.UniversalApiContract")]
public DependencyObject ContainerFromItem(object item);
function containerFromItem(item)
Public Function ContainerFromItem (item As Object) As DependencyObject

參數

item
Object

Platform::Object

IInspectable

要擷取容器的專案。

傳回

如果專案具有容器且存在於集合中,則為對應至指定專案的容器;否則為 null

屬性

適用於