다음을 통해 공유


IXamlDirect.ClearProperty(Object, XamlPropertyIndex) 메서드

정의

지정된 IXamlDirect에서 지정된 속성의 값을 지웁니다.

이 설명서는 UWP용 WinUI 2에 적용됩니다(Windows 앱 SDKWinUI의 경우 Windows 앱 SDK 네임스페이스 참조).

public:
 void ClearProperty(Platform::Object ^ xamlDirectObject, XamlPropertyIndex propertyIndex);
void ClearProperty(IInspectable const& xamlDirectObject, XamlPropertyIndex const& propertyIndex);
public void ClearProperty(object xamlDirectObject, XamlPropertyIndex propertyIndex);
Public Sub ClearProperty (xamlDirectObject As Object, propertyIndex As XamlPropertyIndex)

매개 변수

xamlDirectObject
Object

Platform::Object

IInspectable

특정 IXamlDirect에 대한 참조입니다.

propertyIndex
XamlPropertyIndex

XamlPropertyIndex 열거형의 지원되는 속성 목록에서 지울 속성에 대한 참조입니다.

예제

다음 예제에서는 XamlDirect API를 통해 Border 요소의 MinHeight 속성 값을 지우는 방법을 보여 줍니다.

XamlDirect xd = XamlDirect.GetDefault();
IXamlDirect border = xd.CreateInstance(XamlTypeIndex.Border);
xd.ClearProperty(border, XamlPropertyIndex.FrameworkElement_MinHeight);
XamlDirect^ xd = XamlDirect::GetDefault();
IXamlDirect^ border = xd->CreateInstance(XamlTypeIndex::Border);
xd->ClearProperty(border, XamlPropertyIndex::FrameworkElement_MinHeight);

적용 대상