IXamlDirect.RemoveFromCollectionAt(Object, UInt32) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 인덱스의 IXamlDirect 컬렉션에서 값을 제거하려고 시도합니다.
이 설명서는 UWP용 WinUI 2에 적용됩니다(Windows 앱 SDKWinUI의 경우 Windows 앱 SDK 네임스페이스 참조).
public:
void RemoveFromCollectionAt(Platform::Object ^ xamlDirectObject, unsigned int index);
void RemoveFromCollectionAt(IInspectable const& xamlDirectObject, uint32_t const& index);
public void RemoveFromCollectionAt(object xamlDirectObject, uint index);
Public Sub RemoveFromCollectionAt (xamlDirectObject As Object, index As UInteger)
매개 변수
- xamlDirectObject
-
Object
Platform::Object
IInspectable
특정 IXamlDirect 컬렉션을 참조합니다.
- index
-
UInt32
unsigned int
uint32_t
값을 제거해야 하는 컬렉션의 인덱스를 참조합니다.
예제
다음 예제에서는 XamlDirect API를 사용하여 특정 인덱스에서 값을 제거하는 방법을 보여 줍니다.
XamlDirect xd = XamlDirect.GetDefault();
IXamlDirect relativePanel = xd.CreateInstance(XamlTypeIndex.RelativePanel);
IXamlDirect childrenCollection = xd.GetXamlDirectObjectProperty(relativePanel, XamlPropertyIndex.Panel_Children);
xd.RemoveFromCollectionAt(childrenCollection, 0);
XamlDirect^ xd = XamlDirect::GetDefault();
IXamlDirect^ relativePanel = xd->CreateInstance(XamlTypeIndex::RelativePanel);
IXamlDirect^ childrenCollection = xd->GetXamlDirectObjectProperty(relativePanel, XamlPropertyIndex::Panel_Children);
xd->RemoveFromCollectionAt(childrenCollection, 0);
적용 대상
추가 정보
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기