Бөлісу құралы:


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.ComponentModel;
using System.ComponentModel.Design;
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.
[Designer(typeof(SampleRootDesigner), typeof(IRootDesigner))]
public class RootDesignedComponent : 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".
[ToolboxItemFilter("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.
    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.
    readonly 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 => [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",
            nameof(technology));
        }

        // Creates the view object if it has not yet been initialized.
        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.
    [Designer(typeof(ParentControlDesigner), typeof(IDesigner))]
    internal class RootDesignerView : Control
    {
        // This field stores a reference to a designer.
        readonly 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 предоставляет базовый класс для конструкторов элементов управления, которые могут содержать дочерние элементы управления. Помимо методов и функциональных возможностей, унаследованных от ControlDesigner классов и ComponentDesigner классов, ParentControlDesigner позволяет добавлять дочерние элементы управления, удалять из него, выбирать их и упорядочивать в элементе управления, поведение которого оно расширяется во время разработки.

Конструктор можно связать с типом с помощью .DesignerAttribute

Конструкторы

Имя Описание
ParentControlDesigner()

Инициализирует новый экземпляр класса ParentControlDesigner.

Поля

Имя Описание
accessibilityObj

Указывает объект специальных возможностей для конструктора.

(Унаследовано от ControlDesigner)

Свойства

Имя Описание
AccessibilityObject

Возвращает назначенный AccessibleObject элементу управления.

(Унаследовано от ControlDesigner)
ActionLists

Возвращает списки действий во время разработки, поддерживаемые компонентом, связанным с конструктором.

(Унаследовано от ComponentDesigner)
AllowControlLasso

Возвращает значение, указывающее, будут ли выбранные элементы управления повторно родительскими.

AllowGenericDragBox

Возвращает значение, указывающее, следует ли нарисовать универсальное поле перетаскивания при перетаскивании элемента панели элементов по поверхности конструктора.

AllowSetChildIndexOnDrop

Возвращает значение, указывающее, следует ли сохранять порядок перетаскиваемых элементов управления при удалении на объекте ParentControlDesigner.

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 объектов, представляющих значительные точки выравнивания для этого элемента управления.

Verbs

Возвращает команды времени разработки, поддерживаемые компонентом, связанным с конструктором.

(Унаследовано от ComponentDesigner)

Методы

Имя Описание
AddPaddingSnapLines(ArrayList)

Добавляет линии оснастки с заполнением.

BaseWndProc(Message)

Обрабатывает сообщения Windows.

(Унаследовано от ControlDesigner)
CanAddComponent(IComponent)

Вызывается при добавлении компонента в родительский контейнер.

CanBeParentedTo(IDesigner)

Указывает, может ли элемент управления конструктора быть родительским элементом указанного конструктора.

(Унаследовано от ControlDesigner)
CanParent(Control)

Указывает, может ли указанный элемент управления быть дочерним элементом элемента управления, управляемым этим конструктором.

CanParent(ControlDesigner)

Указывает, может ли элемент управления, управляемый указанным конструктором, быть дочерним элементом элемента управления, управляемым этим конструктором.

CreateTool(ToolboxItem, Point)

Создает компонент или элемент управления из указанного средства и добавляет его в текущий документ конструктора в указанном расположении.

CreateTool(ToolboxItem, Rectangle)

Создает компонент или элемент управления из указанного средства и добавляет его в текущий документ конструктора в пределах указанного прямоугольника.

CreateTool(ToolboxItem)

Создает компонент или элемент управления из указанного средства и добавляет его в текущий документ конструктора.

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)

Получает глиф тела, представляющий границы элемента управления.

GetGlyphs(GlyphSelectionType)

Возвращает коллекцию Glyph объектов, представляющих границы выделения и дескриптор захвата для стандартного элемента управления.

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)

Инициализирует только что созданный компонент.

InitializeNonDefault()

Инициализирует свойства элемента управления для любых значений, не являющихся значениями по умолчанию.

(Унаследовано от ControlDesigner)
InternalControlDesigner(Int32)

Возвращает конструктор внутренних элементов управления с указанным индексом в элементе ControlDesignerуправления.

(Унаследовано от ControlDesigner)
InvokeCreateTool(ParentControlDesigner, ToolboxItem)

Создает инструмент из указанного ToolboxItemобъекта.

InvokeGetInheritanceAttribute(ComponentDesigner)

InheritanceAttribute Возвращает указанный ComponentDesignerобъект.

(Унаследовано от ComponentDesigner)
MemberwiseClone()

Создает неглубокую копию текущей Object.

(Унаследовано от Object)
NumberOfInternalControlDesigners()

Возвращает количество конструкторов внутренних элементов управления в элементе ControlDesignerуправления.

(Унаследовано от ControlDesigner)
OnContextMenu(Int32, Int32)

Отображает контекстное меню и предоставляет возможность выполнять дополнительную обработку при отображении контекстного меню.

(Унаследовано от ControlDesigner)
OnCreateHandle()

Предоставляет возможность выполнять дополнительную обработку сразу после создания дескриптора элемента управления.

(Унаследовано от ControlDesigner)
OnDragComplete(DragEventArgs)

Вызывается для очистки операции перетаскивания.

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)

Применяется к

См. также раздел