ParentControlDesigner 类

定义

扩展支持嵌套控件的 Control 的设计模式行为。

public ref class ParentControlDesigner : System::Windows::Forms::Design::ControlDesigner
public class ParentControlDesigner : System.Windows.Forms.Design.ControlDesigner
type ParentControlDesigner = class
    inherit ControlDesigner
Public Class ParentControlDesigner
Inherits ControlDesigner
继承
ParentControlDesigner
派生

示例

以下示例演示如何实现自定义 ParentControlDesigner。 此代码示例是为 接口提供的更大示例的 IToolboxUser 一部分。

#using <System.Drawing.dll>
#using <System.dll>
#using <System.Design.dll>
#using <System.Windows.Forms.dll>

using namespace System;
using namespace System::Collections;
using namespace System::ComponentModel;
using namespace System::ComponentModel::Design;
using namespace System::Diagnostics;
using namespace System::Drawing;
using namespace System::Drawing::Design;
using namespace System::Windows::Forms;
using namespace System::Windows::Forms::Design;

// This example contains an IRootDesigner that implements the IToolboxUser interface.
// This example demonstrates how to enable the GetToolSupported method of an IToolboxUser
// designer in order to disable specific toolbox items, and how to respond to the 
// invocation of a ToolboxItem in the ToolPicked method of an IToolboxUser implementation.
public ref class SampleRootDesigner;

// The following attribute associates the SampleRootDesigner with this example component.

[DesignerAttribute(__typeof(SampleRootDesigner),__typeof(IRootDesigner))]
public ref class RootDesignedComponent: public Control{};


// This example component class demonstrates the associated IRootDesigner which 
// implements the IToolboxUser interface. When designer view is invoked, Visual 
// Studio .NET attempts to display a design mode view for the class at the top 
// of a code file. This can sometimes fail when the class is one of multiple types 
// in a code file, and has a DesignerAttribute associating it with an IRootDesigner. 
// Placing a derived class at the top of the code file solves this problem. A 
// derived class is not typically needed for this reason, except that placing the 
// RootDesignedComponent class in another file is not a simple solution for a code 
// example that is packaged in one segment of code.
public ref class RootViewSampleComponent: public RootDesignedComponent{};


// This example IRootDesigner implements the IToolboxUser interface and provides a 
// Windows Forms view technology view for its associated component using an internal 
// Control type.     
// The following ToolboxItemFilterAttribute enables the GetToolSupported method of this
// IToolboxUser designer to be queried to check for whether to enable or disable all 
// ToolboxItems which create any components whose type name begins with "System.Windows.Forms".

[ToolboxItemFilterAttribute(S"System.Windows.Forms",ToolboxItemFilterType::Custom)]
public ref class SampleRootDesigner: public ParentControlDesigner, public IRootDesigner, public IToolboxUser
{
public private:
   ref class RootDesignerView;

private:

   // This field is a custom Control type named RootDesignerView. This field references
   // a control that is shown in the design mode document window.
   RootDesignerView^ view;

   // This string array contains type names of components that should not be added to 
   // the component managed by this designer from the Toolbox.  Any ToolboxItems whose 
   // type name matches a type name in this array will be marked disabled according to  
   // the signal returned by the IToolboxUser.GetToolSupported method of this designer.
   array<String^>^blockedTypeNames;

public:
   SampleRootDesigner()
   {
      array<String^>^tempTypeNames = {"System.Windows.Forms.ListBox","System.Windows.Forms.GroupBox"};
      blockedTypeNames = tempTypeNames;
   }


private:

   property array<ViewTechnology>^ SupportedTechnologies 
   {

      // IRootDesigner.SupportedTechnologies is a required override for an IRootDesigner.
      // This designer provides a display using the Windows Forms view technology.
      array<ViewTechnology>^ IRootDesigner::get()
      {
         ViewTechnology temp0[] = {ViewTechnology::WindowsForms};
         return temp0;
      }

   }

   // This method returns an object that provides the view for this root designer. 
   Object^ IRootDesigner::GetView( ViewTechnology technology )
   {
      
      // If the design environment requests a view technology other than Windows 
      // Forms, this method throws an Argument Exception.
      if ( technology != ViewTechnology::WindowsForms )
            throw gcnew ArgumentException( "An unsupported view technology was requested","Unsupported view technology." );

      
      // Creates the view object if it has not yet been initialized.
      if ( view == nullptr )
            view = gcnew RootDesignerView( this );

      return view;
   }


   // This method can signal whether to enable or disable the specified
   // ToolboxItem when the component associated with this designer is selected.
   bool IToolboxUser::GetToolSupported( ToolboxItem^ tool )
   {
      
      // Search the blocked type names array for the type name of the tool
      // for which support for is being tested. Return false to indicate the
      // tool should be disabled when the associated component is selected.
      for ( int i = 0; i < blockedTypeNames->Length; i++ )
         if ( tool->TypeName == blockedTypeNames[ i ] )
                  return false;

      
      // Return true to indicate support for the tool, if the type name of the
      // tool is not located in the blockedTypeNames string array.
      return true;
   }


   // This method can perform behavior when the specified tool has been invoked.
   // Invocation of a ToolboxItem typically creates a component or components, 
   // and adds any created components to the associated component.
   void IToolboxUser::ToolPicked( ToolboxItem^ /*tool*/ ){}


public private:

   // This control provides a Windows Forms view technology view object that 
   // provides a display for the SampleRootDesigner.

   [DesignerAttribute(__typeof(ParentControlDesigner),__typeof(IDesigner))]
   ref class RootDesignerView: public Control
   {
   private:

      // This field stores a reference to a designer.
      IDesigner^ m_designer;

   public:
      RootDesignerView( IDesigner^ designer )
      {
         
         // Perform basic control initialization.
         m_designer = designer;
         BackColor = Color::Blue;
         Font = gcnew System::Drawing::Font( Font->FontFamily->Name,24.0f );
      }


   protected:

      // This method is called to draw the view for the SampleRootDesigner.
      void OnPaint( PaintEventArgs^ pe )
      {
         Control::OnPaint( pe );
         
         // Draw the name of the component in large letters.
         pe->Graphics->DrawString( m_designer->Component->Site->Name, Font, Brushes::Yellow, ClientRectangle );
      }

   };


};
using System;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Design;
using System.Windows.Forms;
using System.Windows.Forms.Design;

// This example contains an IRootDesigner that implements the IToolboxUser interface.
// This example demonstrates how to enable the GetToolSupported method of an IToolboxUser
// designer in order to disable specific toolbox items, and how to respond to the 
// invocation of a ToolboxItem in the ToolPicked method of an IToolboxUser implementation.
namespace IToolboxUserExample
{
    // This example component class demonstrates the associated IRootDesigner which 
    // implements the IToolboxUser interface. When designer view is invoked, Visual 
    // Studio .NET attempts to display a design mode view for the class at the top 
    // of a code file. This can sometimes fail when the class is one of multiple types 
    // in a code file, and has a DesignerAttribute associating it with an IRootDesigner. 
    // Placing a derived class at the top of the code file solves this problem. A 
    // derived class is not typically needed for this reason, except that placing the 
    // RootDesignedComponent class in another file is not a simple solution for a code 
    // example that is packaged in one segment of code.
    public class RootViewSampleComponent : RootDesignedComponent
    {
    }

    // The following attribute associates the SampleRootDesigner with this example component.
    [DesignerAttribute(typeof(SampleRootDesigner), typeof(IRootDesigner))]
    public class RootDesignedComponent : System.Windows.Forms.Control
    {
    }

    // This example IRootDesigner implements the IToolboxUser interface and provides a 
    // Windows Forms view technology view for its associated component using an internal 
    // Control type.     
    // The following ToolboxItemFilterAttribute enables the GetToolSupported method of this
    // IToolboxUser designer to be queried to check for whether to enable or disable all 
    // ToolboxItems which create any components whose type name begins with "System.Windows.Forms".
    [ToolboxItemFilterAttribute("System.Windows.Forms", ToolboxItemFilterType.Custom)]
    public class SampleRootDesigner : ParentControlDesigner, IRootDesigner, IToolboxUser
    {
        // This field is a custom Control type named RootDesignerView. This field references
        // a control that is shown in the design mode document window.
        private RootDesignerView view;

        // This string array contains type names of components that should not be added to 
        // the component managed by this designer from the Toolbox.  Any ToolboxItems whose 
        // type name matches a type name in this array will be marked disabled according to  
        // the signal returned by the IToolboxUser.GetToolSupported method of this designer.
        private string[] blockedTypeNames =
        {
            "System.Windows.Forms.ListBox",
            "System.Windows.Forms.GroupBox"
        };

        // IRootDesigner.SupportedTechnologies is a required override for an IRootDesigner.
        // This designer provides a display using the Windows Forms view technology.
        ViewTechnology[] IRootDesigner.SupportedTechnologies 
        {
            get { return new ViewTechnology[] {ViewTechnology.Default}; }
        }

        // This method returns an object that provides the view for this root designer. 
        object IRootDesigner.GetView(ViewTechnology technology) 
        {
            // If the design environment requests a view technology other than Windows 
            // Forms, this method throws an Argument Exception.
            if (technology != ViewTechnology.Default)            
                throw new ArgumentException("An unsupported view technology was requested", 
                "Unsupported view technology.");            
            
            // Creates the view object if it has not yet been initialized.
            if (view == null)                            
                view = new RootDesignerView(this);          
  
            return view;
        }

        // This method can signal whether to enable or disable the specified
        // ToolboxItem when the component associated with this designer is selected.
        bool IToolboxUser.GetToolSupported(ToolboxItem tool)
        {       
            // Search the blocked type names array for the type name of the tool
            // for which support for is being tested. Return false to indicate the
            // tool should be disabled when the associated component is selected.
            for( int i=0; i<blockedTypeNames.Length; i++ )
                if( tool.TypeName == blockedTypeNames[i] )
                    return false;
            
            // Return true to indicate support for the tool, if the type name of the
            // tool is not located in the blockedTypeNames string array.
            return true;
        }
    
        // This method can perform behavior when the specified tool has been invoked.
        // Invocation of a ToolboxItem typically creates a component or components, 
        // and adds any created components to the associated component.
        void IToolboxUser.ToolPicked(ToolboxItem tool)
        {
        }

        // This control provides a Windows Forms view technology view object that 
        // provides a display for the SampleRootDesigner.
        [DesignerAttribute(typeof(ParentControlDesigner), typeof(IDesigner))]
        internal class RootDesignerView : Control
        {
            // This field stores a reference to a designer.
            private IDesigner m_designer;

            public RootDesignerView(IDesigner designer)
            {
                // Perform basic control initialization.
                m_designer = designer;
                BackColor = Color.Blue;
                Font = new Font(Font.FontFamily.Name, 24.0f);                
            }

            // This method is called to draw the view for the SampleRootDesigner.
            protected override void OnPaint(PaintEventArgs pe)
            {
                base.OnPaint(pe);
                // Draw the name of the component in large letters.
                pe.Graphics.DrawString(m_designer.Component.Site.Name, Font, Brushes.Yellow, ClientRectangle);
            }
        }
    }
}
Imports System.Collections
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Diagnostics
Imports System.Drawing
Imports System.Drawing.Design
Imports System.Windows.Forms
Imports System.Windows.Forms.Design

' This example contains an IRootDesigner that implements the IToolboxUser interface.
' This example demonstrates how to enable the GetToolSupported method of an IToolboxUser
' designer in order to disable specific toolbox items, and how to respond to the 
' invocation of a ToolboxItem in the ToolPicked method of an IToolboxUser implementation.
' This example component class demonstrates the associated IRootDesigner which 
' implements the IToolboxUser interface. When designer view is invoked, Visual 
' Studio .NET attempts to display a design mode view for the class at the top 
' of a code file. This can sometimes fail when the class is one of multiple types 
' in a code file, and has a DesignerAttribute associating it with an IRootDesigner. 
' Placing a derived class at the top of the code file solves this problem. A 
' derived class is not typically needed for this reason, except that placing the 
' RootDesignedComponent class in another file is not a simple solution for a code 
' example that is packaged in one segment of code.

Public Class RootViewSampleComponent
    Inherits RootDesignedComponent
End Class

' The following attribute associates the SampleRootDesigner with this example component.
<DesignerAttribute(GetType(SampleRootDesigner), GetType(IRootDesigner))> _
Public Class RootDesignedComponent
    Inherits System.Windows.Forms.Control
End Class

' This example IRootDesigner implements the IToolboxUser interface and provides a 
' Windows Forms view technology view for its associated component using an internal 
' Control type.     
' The following ToolboxItemFilterAttribute enables the GetToolSupported method of this
' IToolboxUser designer to be queried to check for whether to enable or disable all 
' ToolboxItems which create any components whose type name begins with "System.Windows.Forms".
<ToolboxItemFilterAttribute("System.Windows.Forms", ToolboxItemFilterType.Custom)> _
<System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
Public Class SampleRootDesigner
    Inherits ParentControlDesigner
    Implements IRootDesigner, IToolboxUser

    ' Member field of custom type RootDesignerView, a control that is shown in the 
    ' design mode document window. This member is cached to reduce processing needed 
    ' to recreate the view control on each call to GetView().
    Private m_view As RootDesignerView

    ' This string array contains type names of components that should not be added to 
    ' the component managed by this designer from the Toolbox.  Any ToolboxItems whose 
    ' type name matches a type name in this array will be marked disabled according to  
    ' the signal returned by the IToolboxUser.GetToolSupported method of this designer.
    Private blockedTypeNames As String() = {"System.Windows.Forms.ListBox", "System.Windows.Forms.GroupBox"}

    ' IRootDesigner.SupportedTechnologies is a required override for an IRootDesigner.
    ' This designer provides a display using the Windows Forms view technology.
    ReadOnly Property SupportedTechnologies() As ViewTechnology() Implements IRootDesigner.SupportedTechnologies
        Get
            Return New ViewTechnology() {ViewTechnology.Default}
        End Get
    End Property

    ' This method returns an object that provides the view for this root designer. 
    Function GetView(ByVal technology As ViewTechnology) As Object Implements IRootDesigner.GetView
        ' If the design environment requests a view technology other than Windows 
        ' Forms, this method throws an Argument Exception.
        If technology <> ViewTechnology.Default Then
            Throw New ArgumentException("An unsupported view technology was requested", "Unsupported view technology.")
        End If

        ' Creates the view object if it has not yet been initialized.
        If m_view Is Nothing Then
            m_view = New RootDesignerView(Me)
        End If
        Return m_view
    End Function

    ' This method can signal whether to enable or disable the specified
    ' ToolboxItem when the component associated with this designer is selected.
    Function GetToolSupported(ByVal tool As ToolboxItem) As Boolean Implements IToolboxUser.GetToolSupported
        ' Search the blocked type names array for the type name of the tool
        ' for which support for is being tested. Return false to indicate the
        ' tool should be disabled when the associated component is selected.
        Dim i As Integer
        For i = 0 To blockedTypeNames.Length - 1
            If tool.TypeName = blockedTypeNames(i) Then
                Return False
            End If
        Next i ' Return true to indicate support for the tool, if the type name of the
        ' tool is not located in the blockedTypeNames string array.
        Return True
    End Function

    ' This method can perform behavior when the specified tool has been invoked.
    ' Invocation of a ToolboxItem typically creates a component or components, 
    ' and adds any created components to the associated component.
    Sub ToolPicked(ByVal tool As ToolboxItem) Implements IToolboxUser.ToolPicked
    End Sub

    ' This control provides a Windows Forms view technology view object that 
    ' provides a display for the SampleRootDesigner.
    <DesignerAttribute(GetType(ParentControlDesigner), GetType(IDesigner))> _
    Friend Class RootDesignerView
        Inherits Control
        ' This field stores a reference to a designer.
        Private m_designer As IDesigner

        Public Sub New(ByVal designer As IDesigner)
            ' Performs basic control initialization.
            m_designer = designer
            BackColor = Color.Blue
            Font = New Font(Font.FontFamily.Name, 24.0F)
        End Sub

        ' This method is called to draw the view for the SampleRootDesigner.
        Protected Overrides Sub OnPaint(ByVal pe As PaintEventArgs)
            MyBase.OnPaint(pe)
            ' Draws the name of the component in large letters.
            pe.Graphics.DrawString(m_designer.Component.Site.Name, Font, Brushes.Yellow, New RectangleF(ClientRectangle.X, ClientRectangle.Y, ClientRectangle.Width, ClientRectangle.Height))
        End Sub
    End Class
End Class

注解

ParentControlDesigner 为可包含子控件的控件设计器提供基类。 除了从 ControlDesignerComponentDesigner 类继承的方法和功能外, ParentControlDesigner 还允许子控件添加到、删除、选择子控件,并在控件中排列,这些控件的行为在设计时会扩展。

可以使用 将设计器与类型 DesignerAttribute相关联。 有关自定义设计时行为的概述,请参阅 扩展 Design-Time 支持

构造函数

ParentControlDesigner()

初始化 ParentControlDesigner 类的新实例。

字段

accessibilityObj

为设计器指定可访问对象。

(继承自 ControlDesigner)

属性

AccessibilityObject

获取分配给该控件的 AccessibleObject

(继承自 ControlDesigner)
ActionLists

获取与设计器相关联的组件所支持的设计时操作列表。

(继承自 ComponentDesigner)
AllowControlLasso

获取一个值,该值指示选择的控件是否重新设置为父级。

AllowGenericDragBox

获取一个值,指示拖动工具箱项悬停于设计器图面上时是否应绘制一般拖动框。

AllowSetChildIndexOnDrop

获取一个值,指示控件拖放到 ParentControlDesigner 上时是否应保持其 z-顺序。

AssociatedComponents

获取与设计器所管理的组件关联的组件集合。

(继承自 ControlDesigner)
AutoResizeHandles

获取或设置一个值,该值指示调整手柄的分配是否取决于 AutoSize 属性的值。

(继承自 ControlDesigner)
BehaviorService

从设计环境获取 BehaviorService

(继承自 ControlDesigner)
Component

获取此设计器正在设计的组件。

(继承自 ComponentDesigner)
Control

获取设计器正在设计的控件。

(继承自 ControlDesigner)
DefaultControlLocation

获取已添至设计器的控件的默认位置。

DrawGrid

获取或设置一个值,该值指示是否应为此设计器在控件上绘制网格。

EnableDragRect

获取一个值,该值指示设计器是否绘制拖动矩形。

GridSize

获取或设置网格的各个方格的大小,该网格在设计器处于网格绘制模式时绘制。

InheritanceAttribute

获取设计器的 InheritanceAttribute

(继承自 ControlDesigner)
Inherited

获取一个值,该值指示是否继承此组件。

(继承自 ComponentDesigner)
MouseDragTool

获取一个值,该值指示在拖动操作过程中设计器是否具有一个有效工具。

ParentComponent

获取 ControlDesigner 的父组件。

(继承自 ControlDesigner)
ParticipatesWithSnapLines

获取一个值,该值指示在拖动操作期间 ControlDesigner 是否允许按对齐线对齐。

(继承自 ControlDesigner)
SelectionRules

获取指示组件的移动功能的选择规则。

(继承自 ControlDesigner)
SetTextualDefaultProperty

扩展支持嵌套控件的 Control 的设计模式行为。

(继承自 ComponentDesigner)
ShadowProperties

获取重写用户设置的属性值的集合。

(继承自 ComponentDesigner)
SnapLines

获取表示此控件的重要对齐点的 SnapLine 对象的列表。

SnapLines

获取表示此控件的重要对齐点的 SnapLine 对象的列表。

(继承自 ControlDesigner)
Verbs

获取与设计器相关联的组件所支持的设计时谓词。

(继承自 ComponentDesigner)

方法

AddPaddingSnapLines(ArrayList)

添加填充对齐线。

BaseWndProc(Message)

处理 Windows 消息。

(继承自 ControlDesigner)
CanAddComponent(IComponent)

向父容器添加组件时调用。

CanBeParentedTo(IDesigner)

指示指定设计器的控件是否可以成为此设计器控件的父级。

(继承自 ControlDesigner)
CanParent(Control)

指示指定的控件是否可以是由此设计器管理的控件的子级。

CanParent(ControlDesigner)

指示由指定设计器管理的控件是否可以是由此设计器管理的控件的子级。

CreateTool(ToolboxItem)

从指定工具创建一个组件或控件并将其添加到当前的设计文档。

CreateTool(ToolboxItem, Point)

从指定工具创建组件或控件,并将其添至当前设计文档中的指定位置。

CreateTool(ToolboxItem, Rectangle)

从指定工具创建组件或控件,并将其添至当前设计文档中所指定矩形的界限内。

CreateToolCore(ToolboxItem, Int32, Int32, Int32, Int32, Boolean, Boolean)

为所有的 CreateTool(ToolboxItem) 方法提供核心功能。

DefWndProc(Message)

提供对 Windows 消息的默认处理。

(继承自 ControlDesigner)
DisplayError(Exception)

向用户显示有关所指定异常的信息。

(继承自 ControlDesigner)
Dispose()

释放由 ComponentDesigner 使用的所有资源。

(继承自 ComponentDesigner)
Dispose(Boolean)

释放由 ParentControlDesigner 占用的非托管资源,还可以另外再释放托管资源。

DoDefaultAction()

在源代码文件中为组件的默认事件创建方法签名,并将用户的光标定位到该位置。

(继承自 ComponentDesigner)
EnableDesignMode(Control, String)

启用子控件的设计时功能。

(继承自 ControlDesigner)
EnableDragDrop(Boolean)

启用或禁用对正在设计的控件的拖放支持。

(继承自 ControlDesigner)
Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetControl(Object)

从所指定组件的设计器中获取控件。

GetControlGlyph(GlyphSelectionType)

获取表示控件的边界的主体标志符号。

GetControlGlyph(GlyphSelectionType)

返回表示此控件的边界的 ControlBodyGlyph

(继承自 ControlDesigner)
GetGlyphs(GlyphSelectionType)

获取一个 Glyph 对象的集合,其中的 Glyph 对象表示标准控件的选择边框和抓取手柄。

GetGlyphs(GlyphSelectionType)

获取一个 Glyph 对象的集合,其中的 Glyph 对象表示标准控件的选择边框和抓取手柄。

(继承自 ControlDesigner)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetHitTest(Point)

指示该控件是否应处理在指定点单击鼠标的操作。

(继承自 ControlDesigner)
GetParentForComponent(IComponent)

由基类用来确定在向其添加组件时是否返回正在设计的控件或其他某个 Container

GetService(Type)

尝试从设计器组件的设计模式站点检索指定类型的服务。

(继承自 ComponentDesigner)
GetType()

获取当前实例的 Type

(继承自 Object)
GetUpdatedRect(Rectangle, Rectangle, Boolean)

更新所指定矩形的位置,如果启用了网格对齐模式,则对其进行调整以便对齐网格。

HookChildControls(Control)

将来自指定控件的子控件的消息路由到设计器。

(继承自 ControlDesigner)
Initialize(IComponent)

用指定的组件初始化设计器。

InitializeExistingComponent(IDictionary)

重新初始化现有组件。

(继承自 ControlDesigner)
InitializeNewComponent(IDictionary)

初始化新创建的组件。

InitializeNewComponent(IDictionary)

初始化新创建的组件。

(继承自 ControlDesigner)
InitializeNonDefault()

将控件的属性初始化为任何非默认值。

(继承自 ControlDesigner)
InternalControlDesigner(Int32)

返回 ControlDesigner 中具有指定索引的内部控件设计器。

(继承自 ControlDesigner)
InvokeCreateTool(ParentControlDesigner, ToolboxItem)

从指定的 ToolboxItem 创建工具。

InvokeGetInheritanceAttribute(ComponentDesigner)

获取指定 InheritanceAttributeComponentDesigner

(继承自 ComponentDesigner)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
NumberOfInternalControlDesigners()

返回 ControlDesigner 中内部控件设计器的数目。

(继承自 ControlDesigner)
OnContextMenu(Int32, Int32)

显示上下文菜单,并提供在上下文菜单将要显示时执行附加处理的机会。

(继承自 ControlDesigner)
OnCreateHandle()

提供在创建控件处理程序之后立即执行附加处理的机会。

(继承自 ControlDesigner)
OnDragComplete(DragEventArgs)

按顺序调用以清理拖放操作。

OnDragComplete(DragEventArgs)

接收调用以清理拖放操作。

(继承自 ControlDesigner)
OnDragDrop(DragEventArgs)

在将拖放对象放置到控件设计器视图上时调用。

OnDragEnter(DragEventArgs)

在拖放操作进入控件设计器视图时调用。

OnDragLeave(EventArgs)

在拖放操作离开控件设计器视图时调用。

OnDragOver(DragEventArgs)

在控件设计器视图上拖动拖放对象时调用。

OnGiveFeedback(GiveFeedbackEventArgs)

在进行拖放操作时调用,以在拖动操作期间基于鼠标的位置提供视觉提示。

OnGiveFeedback(GiveFeedbackEventArgs)

在进行拖放操作时接收调用,以在拖动操作进行的同时基于鼠标的位置提供可视提示。

(继承自 ControlDesigner)
OnMouseDragBegin(Int32, Int32)

调用以响应在组件上时按下鼠标左键并按住不放这一操作。

OnMouseDragEnd(Boolean)

在拖放操作结束时调用,以完成或取消此次操作。

OnMouseDragMove(Int32, Int32)

为拖放操作期间鼠标的每一次移动而调用。

OnMouseEnter()

当鼠标首次进入控件时调用。

OnMouseEnter()

当鼠标首次进入控件时接收调用。

(继承自 ControlDesigner)
OnMouseHover()

鼠标在控件上悬停后调用。

OnMouseHover()

鼠标在控件上悬停后接收调用。

(继承自 ControlDesigner)
OnMouseLeave()

当鼠标首次进入控件时调用。

OnMouseLeave()

当鼠标首次进入控件时接收调用。

(继承自 ControlDesigner)
OnPaintAdornments(PaintEventArgs)

当设计器正在管理的控件绘制了它的表面时调用,这样设计器就可以在控件顶部绘制任意附加装饰。

OnSetComponentDefaults()
已过时.
已过时.

在设计器初始化时调用。

(继承自 ControlDesigner)
OnSetCursor()

提供更改当前鼠标光标的机会。

PostFilterAttributes(IDictionary)

允许设计器从通过 TypeDescriptor 公开的特性集中更改或移除项。

(继承自 ComponentDesigner)
PostFilterEvents(IDictionary)

允许设计器从通过 TypeDescriptor 公开的事件集中更改或移除项。

(继承自 ComponentDesigner)
PostFilterProperties(IDictionary)

允许设计器从通过 TypeDescriptor 公开的属性集中更改或移除项。

(继承自 ComponentDesigner)
PreFilterAttributes(IDictionary)

允许设计器在通过 TypeDescriptor 公开的特性集中添加项。

(继承自 ComponentDesigner)
PreFilterEvents(IDictionary)

允许设计器在通过 TypeDescriptor 公开的事件集中添加项。

(继承自 ComponentDesigner)
PreFilterProperties(IDictionary)

调整该组件将通过 TypeDescriptor 公开的属性集。

RaiseComponentChanged(MemberDescriptor, Object, Object)

通知 IComponentChangeService 此组件已被更改。

(继承自 ComponentDesigner)
RaiseComponentChanging(MemberDescriptor)

通知 IComponentChangeService 此组件即将被更改。

(继承自 ComponentDesigner)
ToString()

返回表示当前对象的字符串。

(继承自 Object)
UnhookChildControls(Control)

将所指定控件的子级的消息路由到每个控件而不是路由到父级设计器。

(继承自 ControlDesigner)
WndProc(Message)

处理 Windows 消息。

WndProc(Message)

处理 Windows 消息,并可以选择将其路由到控件。

(继承自 ControlDesigner)

显式接口实现

IDesignerFilter.PostFilterAttributes(IDictionary)

有关此成员的说明,请参见 PostFilterAttributes(IDictionary) 方法。

(继承自 ComponentDesigner)
IDesignerFilter.PostFilterEvents(IDictionary)

有关此成员的说明,请参见 PostFilterEvents(IDictionary) 方法。

(继承自 ComponentDesigner)
IDesignerFilter.PostFilterProperties(IDictionary)

有关此成员的说明,请参见 PostFilterProperties(IDictionary) 方法。

(继承自 ComponentDesigner)
IDesignerFilter.PreFilterAttributes(IDictionary)

有关此成员的说明,请参见 PreFilterAttributes(IDictionary) 方法。

(继承自 ComponentDesigner)
IDesignerFilter.PreFilterEvents(IDictionary)

有关此成员的说明,请参见 PreFilterEvents(IDictionary) 方法。

(继承自 ComponentDesigner)
IDesignerFilter.PreFilterProperties(IDictionary)

有关此成员的说明,请参见 PreFilterProperties(IDictionary) 方法。

(继承自 ComponentDesigner)
ITreeDesigner.Children

有关此成员的说明,请参见 Children 属性。

(继承自 ComponentDesigner)
ITreeDesigner.Parent

有关此成员的说明,请参见 Parent 属性。

(继承自 ComponentDesigner)

适用于

另请参阅