共用方式為


ItemsControl.ContainerFromItem(Object) 方法

定義

傳回對應至指定專案的容器。

public:
 virtual DependencyObject ^ ContainerFromItem(Platform::Object ^ item) = ContainerFromItem;
DependencyObject ContainerFromItem(IInspectable const& item);
public DependencyObject ContainerFromItem(object item);
function containerFromItem(item)
Public Function ContainerFromItem (item As Object) As DependencyObject

參數

item
Object

Platform::Object

IInspectable

要為其擷取容器的專案。

傳回

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

實作

M:Microsoft.UI.Xaml.Controls.IItemContainerMapping.ContainerFromItem(System.Object) M:Microsoft.UI.Xaml.Controls.IItemContainerMapping.ContainerFromItem(Platform::Object) M:Microsoft.UI.Xaml.Controls.IItemContainerMapping.ContainerFromItem(IInspectable)

適用於