IDesignerFilter 인터페이스

정의

구성 요소 디자이너에서 디자인 타임 환경에 노출될 수 있는 속성, 특성 및 이벤트 설명자가 저장되어 있는 TypeDescriptor의 사전을 디자이너에서 액세스하고 필터링할 수 있도록 인터페이스를 제공합니다.

public interface class IDesignerFilter
public interface IDesignerFilter
type IDesignerFilter = interface
Public Interface IDesignerFilter
파생

예제

다음 예제에서는 디자이너의 컨트롤이 디자인 타임에 선택 될 때 속성 창 디자이너의 속성을 추가 하는 재정의를 보여 PreFilterProperties 줍니다. 인터페이스를 사용하는 전체 디자이너 예제는 ControlDesigner 클래스의 예제를 IDesignerFilter 참조하세요.

protected:
   [ReflectionPermission(SecurityAction::Demand, Flags=ReflectionPermissionFlag::MemberAccess)]
   virtual void PreFilterProperties( System::Collections::IDictionary^ properties ) override
   {
      properties->Add( "OutlineColor", TypeDescriptor::CreateProperty( TestControlDesigner::typeid, "OutlineColor", System::Drawing::Color::typeid, nullptr ) );
   }
// Adds a property to this designer's control at design time 
// that indicates the outline color to use. 
// The DesignOnlyAttribute ensures that the OutlineColor
// property is not serialized by the designer.
protected override void PreFilterProperties(System.Collections.IDictionary properties)
{
    PropertyDescriptor pd = TypeDescriptor.CreateProperty(
        typeof(ExampleControlDesigner), 
        "OutlineColor",
        typeof(System.Drawing.Color),
        new Attribute[] { new DesignOnlyAttribute(true) });

    properties.Add("OutlineColor", pd);
}
' Adds a property to this designer's control at design time 
' that indicates the outline color to use.
' The DesignOnlyAttribute ensures that the OutlineColor
' property is not serialized by the designer.
Protected Overrides Sub PreFilterProperties(ByVal properties As System.Collections.IDictionary)
    Dim pd As PropertyDescriptor = TypeDescriptor.CreateProperty( _
    GetType(ExampleControlDesigner), _
    "OutlineColor", _
    GetType(System.Drawing.Color), _
    New Attribute() {New DesignOnlyAttribute(True)})

    properties.Add("OutlineColor", pd)
End Sub

설명

IDesignerFilter 를 사용하면 디자이너가 연결된 구성 요소가 를 통해 TypeDescriptor노출하는 속성, 특성 및 이벤트 설명자 집합을 필터링할 수 있습니다. 이름이 로 시작하는 이 인터페이스의 메서드는 이름이 로 Pre 시작하는 Post메서드 바로 앞에 호출됩니다.

특성, 이벤트 또는 속성 설명자를 추가하려면 , PreFilterEvents또는 PreFilterProperties 메서드를 PreFilterAttributes사용합니다.

특성, 이벤트 또는 속성 설명자를 변경하거나 제거하려면 , PostFilterEvents또는 PostFilterProperties 메서드를 PostFilterAttributes사용합니다.

메서드

PostFilterAttributes(IDictionary)

파생 클래스에서 재정의할 때 디자이너에서 TypeDescriptor를 통해 노출된 특성 집합에서 항목을 변경하거나 제거할 수 있습니다.

PostFilterEvents(IDictionary)

파생 클래스에서 재정의할 때 디자이너에서 TypeDescriptor를 통해 노출된 이벤트 집합에서 항목을 변경하거나 제거하도록 합니다.

PostFilterProperties(IDictionary)

파생 클래스에서 재정의할 때 디자이너에서 TypeDescriptor를 통해 노출된 속성 집합에서 항목을 변경하거나 제거할 수 있습니다.

PreFilterAttributes(IDictionary)

파생 클래스에서 재정의할 때 디자이너에서 TypeDescriptor를 통해 노출된 특성 집합에 항목을 추가하도록 합니다.

PreFilterEvents(IDictionary)

파생 클래스에서 재정의할 때 디자이너에서 TypeDescriptor를 통해 노출된 이벤트 집합에 항목을 추가하도록 합니다.

PreFilterProperties(IDictionary)

파생 클래스에서 재정의할 때 디자이너에서 TypeDescriptor를 통해 노출된 속성 집합에 항목을 추가하도록 합니다.

적용 대상

추가 정보