다음을 통해 공유


ParentAdapter 클래스

업데이트: 2007년 11월

자식 개체의 부모가 될 수 있는 모든 형식의 확장 지점을 제공합니다.

네임스페이스:  Microsoft.Windows.Design.Interaction
어셈블리:  Microsoft.Windows.Design.Extensibility(Microsoft.Windows.Design.Extensibility.dll)

구문

Public MustInherit Class ParentAdapter _
    Inherits Adapter

Dim instance As ParentAdapter
public abstract class ParentAdapter : Adapter
public ref class ParentAdapter abstract : public Adapter
public abstract class ParentAdapter extends Adapter

설명

ParentAdapter에서 상속하여 WPF Designer에서 부모-자식 관계를 지정합니다.

WPF(Windows Presentation Foundation)에서는 자식 간에 요소를 옮기거나 부모에 요소를 추가할 때 부모-자식 관계를 자세히 알고 있어야 하는 경우가 많습니다. 각 컨테이너에 컨테이너별 논리를 구현하는 대신 ParentAdapter 클래스는 확장 지점을 정의하고 개체의 부모를 변경하는 일반적인 메커니즘을 지원합니다.

ParentAdapter는 Parent 메서드에서 호출합니다. ModelParent는 현재 부모 개체와 제안된 부모 개체의 ParentAdapter를 찾습니다. ParentAdapter가 없으면 개체에 부모를 할당할 수 없습니다.

컨테이너에서는 ParentAdapter 클래스를 사용하여 부모가 제거될 때 특정 논리를 수행할 수 있습니다. 예를 들어 Canvas에서 Grid로 개체가 이동할 때 캔버스의 연결된 속성을 자동으로 제거할 수 있습니다.

상속 계층 구조

System.Object
  Microsoft.Windows.Design.Features.FeatureProvider
    Microsoft.Windows.Design.Interaction.Adapter
      Microsoft.Windows.Design.Interaction.ParentAdapter

스레드로부터의 안전성

이 형식의 모든 공용 static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

참고 항목

참조

ParentAdapter 멤버

Microsoft.Windows.Design.Interaction 네임스페이스

ModelParent

ModelItem

기타 리소스

WPF Designer 확장성