ParentControlDesigner Classe

Definizione

Estende il comportamento della modalità progettazione di Control che supporta i controlli annidati.

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
Ereditarietà
ParentControlDesigner
Derivato

Esempio

Nell'esempio seguente viene illustrato come implementare un oggetto personalizzato ParentControlDesigner. Questo esempio di codice fa parte di un esempio più grande fornito per l'interfaccia 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

Commenti

ParentControlDesigner fornisce una classe di base per le finestre di progettazione dei controlli che possono contenere controlli figlio. Oltre ai metodi e alle funzionalità ereditate dalle ControlDesigner classi e ComponentDesigner , ParentControlDesigner consente di aggiungere controlli figlio, rimossi da, selezionati all'interno e disposti all'interno del controllo il cui comportamento si estende in fase di progettazione.

È possibile associare una finestra di progettazione a un tipo usando un DesignerAttributeoggetto . Per una panoramica della personalizzazione del comportamento del tempo di progettazione, vedere Estensione Design-Time Supporto.

Costruttori

ParentControlDesigner()

Inizializza una nuova istanza della classe ParentControlDesigner.

Campi

accessibilityObj

Specifica l'oggetto Accessibility per la finestra di progettazione.

(Ereditato da ControlDesigner)

Proprietà

AccessibilityObject

Ottiene l'oggetto AccessibleObject assegnato al controllo.

(Ereditato da ControlDesigner)
ActionLists

Ottiene gli elenchi di azioni in fase di progettazione supportati dal componente associato alla finestra di progettazione.

(Ereditato da ComponentDesigner)
AllowControlLasso

Ottiene un valore che indica se è possibile reimpostare i controlli padre dei controlli selezionati.

AllowGenericDragBox

Ottiene un valore che indica se deve essere disegnata una casella di trascinamento generica quando viene trascinato un elemento della Casella degli strumenti sull'area di progettazione.

AllowSetChildIndexOnDrop

Ottiene un valore che indica se deve essere mantenuto l'ordine z dei controlli trascinati quando vengono rilasciati su un oggetto ParentControlDesigner.

AssociatedComponents

Ottiene l'insieme dei componenti associati al componente gestito dalla finestra di progettazione.

(Ereditato da ControlDesigner)
AutoResizeHandles

Ottiene o imposta un valore che indica se l'assegnazione dei quadratini di ridimensionamento dipende dal valore della proprietà AutoSize.

(Ereditato da ControlDesigner)
BehaviorService

Ottiene l'oggetto BehaviorService dall'ambiente di progettazione.

(Ereditato da ControlDesigner)
Component

Ottiene il componente progettato dalla finestra di progettazione.

(Ereditato da ComponentDesigner)
Control

Ottiene il controllo progettato tramite la finestra di progettazione.

(Ereditato da ControlDesigner)
DefaultControlLocation

Ottiene la posizione predefinita per un controllo aggiunto alla finestra di progettazione.

DrawGrid

Ottiene o imposta un valore che indica se è necessario creare una griglia sul controllo per la finestra di progettazione.

EnableDragRect

Ottiene un valore che indica se i rettangoli di trascinamento vengono creati nella finestra di progettazione.

GridSize

Ottiene o imposta le dimensioni di ciascun quadrato della griglia creato quando nella finestra di progettazione è impostata la modalità di creazione della griglia.

InheritanceAttribute

Ottiene l'oggetto InheritanceAttribute della finestra di progettazione.

(Ereditato da ControlDesigner)
Inherited

Ottiene un valore che indica se questo componente è ereditato.

(Ereditato da ComponentDesigner)
MouseDragTool

Ottiene un valore che indica se nella finestra di progettazione è disponibile uno strumento valido durante un'operazione di trascinamento.

ParentComponent

Ottiene il componente padre per l'oggetto ControlDesigner.

(Ereditato da ControlDesigner)
ParticipatesWithSnapLines

Ottiene un valore che indica se l'oggetto ControlDesigner consente l'allineamento con guide durante un'operazione di trascinamento.

(Ereditato da ControlDesigner)
SelectionRules

Ottiene le regole di selezione che indicano funzioni di spostamento di un componente.

(Ereditato da ControlDesigner)
SetTextualDefaultProperty

Estende il comportamento della modalità progettazione di Control che supporta i controlli annidati.

(Ereditato da ComponentDesigner)
ShadowProperties

Ottiene un insieme di valori di proprietà che eseguono l'override delle impostazioni utente.

(Ereditato da ComponentDesigner)
SnapLines

Ottiene un elenco degli oggetti SnapLine che rappresentano punti di allineamento significativi per questo controllo.

SnapLines

Ottiene un elenco degli oggetti SnapLine che rappresentano punti di allineamento significativi per questo controllo.

(Ereditato da ControlDesigner)
Verbs

Ottiene i verbi in fase di progettazione supportati dal componente associato alla finestra di progettazione.

(Ereditato da ComponentDesigner)

Metodi

AddPaddingSnapLines(ArrayList)

Aggiunge le guide di allineamento per la spaziatura interna.

BaseWndProc(Message)

Elabora i messaggi di Windows.

(Ereditato da ControlDesigner)
CanAddComponent(IComponent)

Chiamato quando un componente viene aggiunto al contenitore padre.

CanBeParentedTo(IDesigner)

Indica se il controllo di questa finestra di progettazione può essere figlio del controllo della finestra di progettazione specificata.

(Ereditato da ControlDesigner)
CanParent(Control)

Indica se il controllo specificato può essere un controllo figlio del controllo gestito tramite questa finestra di progettazione.

CanParent(ControlDesigner)

Indica se il controllo gestito tramite la finestra di progettazione specificata può essere un controllo figlio del controllo gestito tramite questa finestra di progettazione.

CreateTool(ToolboxItem)

Crea un componente o un controllo dallo strumento specificato e lo aggiunge al documento di progettazione corrente.

CreateTool(ToolboxItem, Point)

Crea un componente o un controllo dallo strumento specificato e lo aggiunge al documento di progettazione corrente, nella posizione specificata.

CreateTool(ToolboxItem, Rectangle)

Crea un componente o un controllo dallo strumento specificato e lo aggiunge al documento di progettazione corrente, all'interno dei limiti del rettangolo specificato.

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

Fornisce funzionalità di base per tutti i metodi CreateTool(ToolboxItem).

DefWndProc(Message)

Fornisce l'elaborazione predefinita per i messaggi di Windows.

(Ereditato da ControlDesigner)
DisplayError(Exception)

Visualizza informazioni sull'eccezione specificata.

(Ereditato da ControlDesigner)
Dispose()

Rilascia tutte le risorse usate da ComponentDesigner.

(Ereditato da ComponentDesigner)
Dispose(Boolean)

Rilascia le risorse non gestite usate dall'oggetto ParentControlDesigner e, facoltativamente, le risorse gestite.

DoDefaultAction()

Crea una firma di metodo nel file di codice sorgente per l'evento predefinito sul componente e sposta il cursore dell'utente in tale posizione.

(Ereditato da ComponentDesigner)
EnableDesignMode(Control, String)

Abilita la funzionalità della fase di progettazione per un controllo figlio.

(Ereditato da ControlDesigner)
EnableDragDrop(Boolean)

Abilita o disabilita il supporto delle operazioni di trascinamento per il controllo in fase di progettazione.

(Ereditato da ControlDesigner)
Equals(Object)

Determina se l'oggetto specificato è uguale all'oggetto corrente.

(Ereditato da Object)
GetControl(Object)

Ottiene il controllo dalla finestra di progettazione del componente specificato.

GetControlGlyph(GlyphSelectionType)

Ottiene un'icona per il corpo che rappresenta i limiti del controllo.

GetControlGlyph(GlyphSelectionType)

Restituisce un oggetto ControlBodyGlyph che rappresenta i limiti di questo controllo.

(Ereditato da ControlDesigner)
GetGlyphs(GlyphSelectionType)

Ottiene un insieme degli oggetti Glyph che rappresentano i bordi di selezione e i punti di controllo per un controllo standard.

GetGlyphs(GlyphSelectionType)

Ottiene un insieme degli oggetti Glyph che rappresentano i bordi di selezione e i punti di controllo per un controllo standard.

(Ereditato da ControlDesigner)
GetHashCode()

Funge da funzione hash predefinita.

(Ereditato da Object)
GetHitTest(Point)

Indica se il clic del mouse nel punto specificato deve essere gestito dal controllo.

(Ereditato da ControlDesigner)
GetParentForComponent(IComponent)

Utilizzato derivando classi per determinare se restituisce il controllo in fase di progettazione o un altro oggetto Container durante l'aggiunta di un componente a esso.

GetService(Type)

Esegue un tentativo di recuperare il tipo di servizio specificato dal sito della modalità progettazione del componente della finestra di progettazione.

(Ereditato da ComponentDesigner)
GetType()

Ottiene l'oggetto Type dell'istanza corrente.

(Ereditato da Object)
GetUpdatedRect(Rectangle, Rectangle, Boolean)

Aggiorna la posizione del rettangolo specificato, regolandola per l'allineamento della griglia, qualora tale modalità sia abilitata.

HookChildControls(Control)

Invia alla finestra di progettazione i messaggi dai controlli figlio del controllo specificato.

(Ereditato da ControlDesigner)
Initialize(IComponent)

Inizializza la finestra di progettazione con il componente specificato.

InitializeExistingComponent(IDictionary)

Reinizializza un componente esistente.

(Ereditato da ControlDesigner)
InitializeNewComponent(IDictionary)

Inizializza un nuovo componente creato.

InitializeNewComponent(IDictionary)

Inizializza un nuovo componente creato.

(Ereditato da ControlDesigner)
InitializeNonDefault()

Inizializza le proprietà del controllo su qualsiasi valore non predefinito.

(Ereditato da ControlDesigner)
InternalControlDesigner(Int32)

Restituisce la finestra di progettazione controlli interna con l'indice specificato nell'oggetto ControlDesigner.

(Ereditato da ControlDesigner)
InvokeCreateTool(ParentControlDesigner, ToolboxItem)

Crea uno strumento dall'oggetto ToolboxItem specificato.

InvokeGetInheritanceAttribute(ComponentDesigner)

Ottiene l'oggetto InheritanceAttribute dell'oggetto ComponentDesigner specificato.

(Ereditato da ComponentDesigner)
MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.

(Ereditato da Object)
NumberOfInternalControlDesigners()

Restituisce il numero di finestre di progettazione controlli interne nell'oggetto ControlDesigner.

(Ereditato da ControlDesigner)
OnContextMenu(Int32, Int32)

Visualizza il menu di scelta rapida e consente di eseguire un'ulteriore elaborazione quando tale menu sta per essere visualizzato.

(Ereditato da ControlDesigner)
OnCreateHandle()

Consente di eseguire un'ulteriore elaborazione subito dopo la creazione dell'handle del controllo.

(Ereditato da ControlDesigner)
OnDragComplete(DragEventArgs)

Chiamato per la pulitura di un'operazione di trascinamento della selezione.

OnDragComplete(DragEventArgs)

Riceve una chiamata per la pulitura di un'operazione di trascinamento e rilascio.

(Ereditato da ControlDesigner)
OnDragDrop(DragEventArgs)

Questo metodo viene chiamato quando un oggetto viene trascinato nella visualizzazione di progettazione del controllo.

OnDragEnter(DragEventArgs)

Questo metodo viene chiamato quando un'operazione di trascinamento viene inserita nella finestra di progettazione del controllo.

OnDragLeave(EventArgs)

Questo metodo viene chiamato quando un'operazione di trascinamento viene rimossa dalla finestra di progettazione del controllo.

OnDragOver(DragEventArgs)

Questo metodo viene chiamato quando un oggetto viene trascinato nella finestra di progettazione del controllo.

OnGiveFeedback(GiveFeedbackEventArgs)

Chiamato durante l'esecuzione di un'operazione di trascinamento della selezione, per fornire suggerimenti visivi in base alla posizione del mouse durante il trascinamento.

OnGiveFeedback(GiveFeedbackEventArgs)

Riceve una chiamata durante l'esecuzione di un'operazione di trascinamento e rilascio, per fornire suggerimenti visivi in base alla posizione del mouse durante il trascinamento.

(Ereditato da ControlDesigner)
OnMouseDragBegin(Int32, Int32)

Questo metodo viene chiamato quando il pulsante sinistro viene tenuto premuto sul componente.

OnMouseDragEnd(Boolean)

Questo metodo viene chiamato al temine di un'operazione di trascinamento, al fine di completarla o annullarla.

OnMouseDragMove(Int32, Int32)

Questo metodo viene chiamato per ciascuno spostamento del mouse durante un'operazione di trascinamento.

OnMouseEnter()

Chiamato quando il mouse viene posizionato per la prima volta sul controllo.

OnMouseEnter()

Riceve una chiamata quando il mouse viene posizionato per la prima volta sul controllo.

(Ereditato da ControlDesigner)
OnMouseHover()

Chiamato dopo il passaggio del mouse sul controllo.

OnMouseHover()

Riceve una chiamata dopo il passaggio del mouse sul controllo.

(Ereditato da ControlDesigner)
OnMouseLeave()

Chiamato quando il mouse viene posizionato per la prima volta sul controllo.

OnMouseLeave()

Riceve una chiamata quando il mouse viene posizionato per la prima volta sul controllo.

(Ereditato da ControlDesigner)
OnPaintAdornments(PaintEventArgs)

Questo metodo viene chiamato una volta che il controllo gestito dalla finestra di progettazione ha creato la relativa superficie, in modo da consentire l'uso della finestra di progettazione per aggiungere ulteriori disegni sul controllo.

OnSetComponentDefaults()
Obsoleti.
Obsoleti.

Viene chiamato quando la finestra di progettazione viene inizializzata.

(Ereditato da ControlDesigner)
OnSetCursor()

Consente di modificare il cursore corrente del mouse.

PostFilterAttributes(IDictionary)

Consente a una finestra di progettazione di modificare o rimuovere elementi dall'insieme di attributi esposti tramite un oggetto TypeDescriptor.

(Ereditato da ComponentDesigner)
PostFilterEvents(IDictionary)

Consente a una finestra di progettazione di modificare o rimuovere elementi dal gruppo di eventi esposti tramite un oggetto TypeDescriptor.

(Ereditato da ComponentDesigner)
PostFilterProperties(IDictionary)

Consente a una finestra di progettazione di modificare o rimuovere elementi dall'insieme di proprietà esposte tramite un oggetto TypeDescriptor.

(Ereditato da ComponentDesigner)
PreFilterAttributes(IDictionary)

Consente a una finestra di progettazione di aggiungere un insieme di attributi che vengono esposti tramite un oggetto TypeDescriptor.

(Ereditato da ComponentDesigner)
PreFilterEvents(IDictionary)

Consente a una finestra di progettazione di aggiungere un insieme di eventi che vengono esposti tramite un oggetto TypeDescriptor.

(Ereditato da ComponentDesigner)
PreFilterProperties(IDictionary)

Regola l'insieme di proprietà che verrà esposto dal componente tramite un oggetto TypeDescriptor.

RaiseComponentChanged(MemberDescriptor, Object, Object)

Notifica all'oggetto IComponentChangeService che questo componente è stato modificato.

(Ereditato da ComponentDesigner)
RaiseComponentChanging(MemberDescriptor)

Notifica all'oggetto IComponentChangeService che questo componente sta per essere modificato.

(Ereditato da ComponentDesigner)
ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.

(Ereditato da Object)
UnhookChildControls(Control)

Invia i messaggi per i controlli figlio del controllo specificato a ciascun controllo anziché a una finestra di progettazione padre.

(Ereditato da ControlDesigner)
WndProc(Message)

Elabora i messaggi di Windows.

WndProc(Message)

Elabora i messaggi di Windows ed eventualmente li invia al controllo.

(Ereditato da ControlDesigner)

Implementazioni dell'interfaccia esplicita

IDesignerFilter.PostFilterAttributes(IDictionary)

Per una descrizione di questo membro, vedere il metodo PostFilterAttributes(IDictionary).

(Ereditato da ComponentDesigner)
IDesignerFilter.PostFilterEvents(IDictionary)

Per una descrizione di questo membro, vedere il metodo PostFilterEvents(IDictionary).

(Ereditato da ComponentDesigner)
IDesignerFilter.PostFilterProperties(IDictionary)

Per una descrizione di questo membro, vedere il metodo PostFilterProperties(IDictionary).

(Ereditato da ComponentDesigner)
IDesignerFilter.PreFilterAttributes(IDictionary)

Per una descrizione di questo membro, vedere il metodo PreFilterAttributes(IDictionary).

(Ereditato da ComponentDesigner)
IDesignerFilter.PreFilterEvents(IDictionary)

Per una descrizione di questo membro, vedere il metodo PreFilterEvents(IDictionary).

(Ereditato da ComponentDesigner)
IDesignerFilter.PreFilterProperties(IDictionary)

Per una descrizione di questo membro, vedere il metodo PreFilterProperties(IDictionary).

(Ereditato da ComponentDesigner)
ITreeDesigner.Children

Per una descrizione di questo membro, vedere la proprietà Children.

(Ereditato da ComponentDesigner)
ITreeDesigner.Parent

Per una descrizione di questo membro, vedere la proprietà Parent.

(Ereditato da ComponentDesigner)

Si applica a

Vedi anche