XamlDirect.GetXamlDirectObjectFromCollectionAt 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回指定 IXamlDirectObject 集合中指定索引处的 IXamlDirectObject 项。
public:
virtual IXamlDirectObject ^ GetXamlDirectObjectFromCollectionAt(IXamlDirectObject ^ xamlDirectObject, unsigned int index) = GetXamlDirectObjectFromCollectionAt;
IXamlDirectObject GetXamlDirectObjectFromCollectionAt(IXamlDirectObject const& xamlDirectObject, uint32_t const& index);
public IXamlDirectObject GetXamlDirectObjectFromCollectionAt(IXamlDirectObject xamlDirectObject, uint index);
function getXamlDirectObjectFromCollectionAt(xamlDirectObject, index)
Public Function GetXamlDirectObjectFromCollectionAt (xamlDirectObject As IXamlDirectObject, index As UInteger) As IXamlDirectObject
参数
- xamlDirectObject
- IXamlDirectObject
引用特定的 IXamlDirectObject 集合。
- index
-
UInt32
unsigned int
uint32_t
引用要获取的项集合中的索引。
返回
返回集合的指定索引处的 IXamlDirectObject 项。
示例
以下示例演示如何访问集合的指定索引处的 IXamlDirectObject 项。
XamlDirect xd = XamlDirect.GetDefault();
IXamlDirectObject relativePanel = xd.CreateInstance(XamlTypeIndex.RelativePanel);
IXamlDirectObject childrenCollection = xd.GetXamlDirectObjectProperty(relativePanel, XamlPropertyIndex.Panel_Children);
IXamlDirectObject first = xd.GetXamlDirectObjectFromCollectionAt(childrenCollection, 0);
XamlDirect^ xd = XamlDirect::GetDefault();
IXamlDirectObject^ relativePanel = xd->CreateInstance(XamlTypeIndex::RelativePanel);
IXamlDirectObject^ childrenCollection = xd->GetXamlDirectObjectProperty(relativePanel, XamlPropertyIndex::Panel_Children);
IXamlDirectObject^ first = xd->GetXamlDirectObjectFromCollectionAt(childrenCollection, 0);