ItemContainerGenerator.ItemFromContainer(DependencyObject) 方法

定义

注意

ItemFromContainer 可能会在Windows 8.1后更改或不可用。 请改用 ItemsControl.ItemFromContainer

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

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

参数

container
DependencyObject

与要返回的项对应的 DependencyObject

返回

Object

Platform::Object

IInspectable

包含的项或容器(如果不包含项)。

属性

适用于