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-order)。

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)
ShadowProperties

取得覆寫使用者設定的屬性值集合。

(繼承來源 ComponentDesigner)
SnapLines

取得 SnapLine 物件的清單,表示此控制項的重要對齊點。

SnapLines

取得 SnapLine 物件的清單,表示此控制項的重要對齊點。

(繼承來源 ControlDesigner)
Verbs

取得與設計工具相關元件所支援的設計階段動詞命令 (Verb)。

(繼承來源 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 所使用的 Unmanaged 資源,並選擇性釋放 Managed 資源。

DoDefaultAction()

在元件上預設事件的原始程式碼檔案中建立方法簽章,並將使用者的游標巡覽至該位置。

(繼承來源 ComponentDesigner)
EnableDesignMode(Control, String)

啟用子控制項的設計階段功能。

(繼承來源 ControlDesigner)
EnableDragDrop(Boolean)

啟用或停用設計中之控制項的拖放支援。

(繼承來源 ControlDesigner)
Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetControl(Object)

從指定元件的設計工具取得控制項。

GetControlGlyph(GlyphSelectionType)

取得主體圖像 (Glyph),表示控制項的界限。

GetControlGlyph(GlyphSelectionType)

傳回 ControlBodyGlyph,表示這個控制項的界限。

(繼承來源 ControlDesigner)
GetGlyphs(GlyphSelectionType)

取得 Glyph 物件的集合,表示標準控制項的選取範圍框線和抓取控點。

GetGlyphs(GlyphSelectionType)

取得 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)

適用於

另請參閱