UIElement.OnDisconnectVisualChildren 메서드

정의

클래스별 콘텐츠 또는 자식 속성에서 항목을 제거할 때 레이아웃 및 논리가 작동하는 방식을 구현하려면 이 메서드를 재정의합니다.

protected:
 virtual void OnDisconnectVisualChildren() = OnDisconnectVisualChildren;
void OnDisconnectVisualChildren();
protected virtual void OnDisconnectVisualChildren();
function onDisconnectVisualChildren()
Protected Overridable Sub OnDisconnectVisualChildren ()

설명

UIElement 는 OnDisconnectVisualChildren가 수행할 수 있는 콘텐츠 모델 속성을 정의하지 않습니다. 이러한 속성은 ContentControl 수준과 같은 상속에서 더 심층적으로 도입됩니다.

FrameworkElement 는 OnDisconnectVisualChildren 재정의를 사용하여 DataContextTag의 값을 지웁합니다. 일반적으로 이 메서드를 재정의하는 경우 OnDisconnectVisualChildren에서 작동하는 프레임워크 의도 동작을 보존할 수 있도록 항상 기본 구현을 호출해야 합니다.

VisualTreeHelper.DisconnectChildrenRecursive 는 앱 코드에서 호출할 수 있는 유사한 정적 도우미 API입니다.

적용 대상

추가 정보