System.Design 2.0.0.0 System.Object System.IDisposable

The class is responsible for managing the collection of objects for each instance of a component that exists on a form at design time. This class enables a direct push model of item creation, and is primarily intended for use by design-time tool developers, although it can also be used by component and custom control developers.

Design-time tool developers will need to determine the list of items to display for a component and determine when this list changes. They may also create add-ins that operate in conjunction with smart tag panel objects.

Advanced component developers may need to dynamically control the items associated with a component, thus replacing or supplementing the standard pull model. For example, panel commands can be altered depending on the context of their use and the design-time state of the component.

The is actually the driving service behind both the push and pull models; however, in the latter case it operates implicitly.

provides a straightforward interface for accessing and manipulating the items for each component, including the following methods and events:

The method determines whether the is currently managing a particular component.

The method supports the enumeration of the lists of items.

The method allows adding a or to the set of existing items for a component instance. In contrast, the method removes one or all of the item lists associated with a component.

The method represents the direct push model of associating panel items with a component. In contrast, the pull model relies on overriding the property of the designer class for that component. The design environment is responsible for adding these items into the current when a component is created on the design surface.

The , , , and methods only consider or affect push-model items.

The event indicates when the collection of items changes for a component.

Because it is often desirable to use some of the same panel items in both the component's design-time shortcut menu and its panel, a large degree of interoperability exists between objects and designer verbs.

If a component designer does not explicitly specify a (that is, it does not contain an overridden property), then a list will be created from existing designer verbs. These verbs are specified by the property. In this case, an internal verb list class is used to contain the collection of verb item panel entries.

If you want a to be used both as a panel entry and a design-time shortcut menu entry, then you can set the parameter in the item's constructor.

Use the to control the display of your designer's .

Establishes a design-time service that manages the collection of objects for components.

- Constructor
  2.0.0.0

  A service provider is necessary for monitoring selection and component changes. It is expected to support the and types. The class uses an internal table to manage components and their associated smart tags.

  Typically, component developers will not need to create an instance of this class; instead, they can acquire an existing instance through a call to the method.

  Initializes a new instance of the class.

  The service provider for the current design-time environment.
- Method
  2.0.0.0
  System.Void `` ``

  The method represents the push model of adding smart tag items. The alternate pull model relies on overriding the property in the designer for the corresponding component.

  When this method is called, the lists to be added are scanned for any with the property set to true. These items are added to the list of designer verbs for this component, through a call to the method.

  Smart tags are managed on a component instance basis. The managed collection may contain duplicate entries.

  This method raises the event.

  Adds a to the current collection of managed smart tags.

  The to associate the smart tags with. The that contains the new smart tag items to be added.
- Method
  2.0.0.0
  System.Void `` ``

  The method represents the push model of adding smart tag items. The alternate pull model relies on overriding the property in the designer for the corresponding component.

  When this method is called, the lists to be added are scanned for any with the property set to true. These items are added to the list of designer verbs for this component, through a call to the method.

  Smart tags are managed on a component instance basis. The managed collection may contain duplicate entries.

  This method raises the event.

  Adds a to the current collection of managed smart tags.

  The to associate the smart tags with. The that contains the new smart tag items to be added.
- Method
  2.0.0.0
  System.Void

  The method empties the internal table used to store information about components and their push-model smart tag lists.

  Because this method affects all components managed by the current service, and not just the current component, this method should be used judiciously. Typically, the design-time tool developer uses it when resetting a design surface. Component developers should use one of the methods instead to remove individual smart tag items or lists.

  A event is raised for each component that was previously managed by the current service.

  Releases all components from management and clears all push-model smart tag lists.

- Method
  2.0.0.0
  System.Boolean ``

  The method only recognizes push-model smart tags, which are associated to a component with the method.

  Although there is no structural limitation on the number of concurrent instances created by a design-time tool, typically only a single instance of the service is created per design surface.

  Determines whether the current smart tag service manages the action lists for the specified component.

  true if the component is managed by the current service; otherwise, false.

  The to search for.
- Event
  2.0.0.0
  System.ComponentModel.Design.DesignerActionListsChangedEventHandler

  The following table shows the set of specialized classes associated with the event.

  Specialized type

  Description

  Adds information specific to smart tag list management. This class is specialized from .

  Connects the with its handler.

  Denotes whether a list has been added or removed.

  For more information about handling events, see Consuming Events.

  Occurs when a is removed or added for any component.

- Method
  2.0.0.0
  System.Void

  The method is the implementation of the only method mandated by the interface. Call this method when you are finished using the . It performs two main actions:

  Removes the current service from the list of available services in the design environment through a call to the method.

  Unsubscribes to component change events from the associated interface.

  Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

  Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's Finalize method.

  Releases all resources used by the class.

- Method
  2.0.0.0
  System.Void ``

  The method is the implementation of the only method mandated by the interface. Call this method when you are finished using the . It performs two main actions:

  Removes the current service from the list of available services in the design environment through a call to the method.

  Unsubscribes to component change events from the associated interface.

  This method is called by the public Dispose() method and the method. Dispose() invokes the protected Dispose(Boolean) method with the parameter set to true. invokes Dispose with set to false.

  When the parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the Dispose() method of each referenced object.

  Releases the unmanaged resources used by the and optionally releases the managed resources.

  true to release both managed and unmanaged resources; false to release only unmanaged resources.
- Method
  2.0.0.0
  System.ComponentModel.Design.DesignerActionListCollection ``

  The method is equivalent to a call to the method using a parameter of . Therefore, the collection returned will contain both the push and pull lists of smart tags.

  The returned is the union of item lists added through the methods and also the lists obtained from the instance obtained from the component’s site.

  Returns the collection of smart tag item lists associated with a component.

  The collection of smart tags for the specified component.

  The component that the smart tags are associated with.
- Method
  2.0.0.0
  System.ComponentModel.Design.DesignerActionListCollection `` ``

  This version of the overloaded method filters on the parameter, which can have one of the following values.

  Value

  Description

  All associated smart tags.

  Pull-model smart tags only.

  Push-model smart tags only.

  If the associated designer for a component does not supply a pull-model smart tag list, then the method will instead use the designer's design-time shortcut menu items from the property.

  Returns the collection of smart tag item lists of the specified type associated with a component.

  The collection of smart tags of the specified type for the specified component.

  The component that the smart tags are associated with. The to filter the associated smart tags with.
- Method
  2.0.0.0
  System.Void `` ``

  The method is a helper method for the methods. searches for pull-model smart tags of type , and then adds these to the supplied collection.

  If the component's developer does not explicitly supply a collection of smart tags through the property of its designer, this method will reuse the design-time shortcut menu entries, which are obtained through the property of the designer.

  Retrieves the pull-model smart tags associated with a component.

  The component that the smart tags are associated with. The collection to add the associated smart tags to.
- Method
  2.0.0.0
  System.Void `` ``

  The method is a helper method for the methods. It searches for push-model smart tags of type , and then adds these to the supplied collection.

  Retrieves the push-model smart tags associated with a component.

  The component that the smart tags are associated with. The collection to add the associated smart tags to.
- Method
  2.0.0.0
  System.Void ``

  This version of the method is typically used by design tool developers, because component developers typically do not know what other components exist in the current design space.

  If successful, this method raises the event.

  Removes the specified smart tag list from all components managed by the current service.

  The list of smart tags to be removed.
- Method
  2.0.0.0
  System.Void ``

  If successful, the method raises the event.

  Removes all the smart tag lists associated with the specified component.

  The component to disassociate the smart tags from.
- Method
  2.0.0.0
  System.Void `` ``

  If successful, the method raises the event.

  Removes the specified smart tag list from the specified component.

  The component to disassociate the smart tags from. The smart tag list to remove.