XamlDirect.GetCollectionCount(IXamlDirectObject) 메서드

정의

지정된 IXamlDirectObject 컬렉션의 항목 수를 반환합니다.

public:
 virtual unsigned int GetCollectionCount(IXamlDirectObject ^ xamlDirectObject) = GetCollectionCount;
uint32_t GetCollectionCount(IXamlDirectObject const& xamlDirectObject);
public uint GetCollectionCount(IXamlDirectObject xamlDirectObject);
function getCollectionCount(xamlDirectObject)
Public Function GetCollectionCount (xamlDirectObject As IXamlDirectObject) As UInteger

매개 변수

xamlDirectObject
IXamlDirectObject

특정 IXamlDirectObject 컬렉션을 참조합니다.

반환

UInt32

unsigned int

uint32_t

항목 수입니다.

예제

다음 예제에서는 IXamlDirectObject의 instance 통해 Panel.Children 수를 가져오는 방법을 보여줍니다.

XamlDirect xd = XamlDirect.GetDefault();

IXamlDirectObject relativePanel = xd.CreateInstance(XamlTypeIndex.RelativePanel);

IXamlDirectObject childrenCollection = xd.GetXamlDirectObjectProperty(relativePanel, XamlPropertyIndex.Panel_Children);

uint count = xd.GetCollectionCount(childrenCollection);
XamlDirect^ xd = XamlDirect::GetDefault();

IXamlDirectObject^ relativePanel = xd->CreateInstance(XamlTypeIndex::RelativePanel);

IXamlDirectObject^ childrenCollection = xd->GetXamlDirectObjectProperty(relativePanel, XamlPropertyIndex::Panel_Children);

UINT count = xd->GetCollectionCount(childrenCollection);

적용 대상