Επεξεργασία

Κοινή χρήση μέσω


ToolboxService Class

Definition

Provides a default implementation of the IToolboxService interface.

public ref class ToolboxService abstract : System::ComponentModel::Design::IComponentDiscoveryService, System::Drawing::Design::IToolboxService
public abstract class ToolboxService : System.ComponentModel.Design.IComponentDiscoveryService, System.Drawing.Design.IToolboxService
[System.Security.SecurityCritical]
public abstract class ToolboxService : System.ComponentModel.Design.IComponentDiscoveryService, System.Drawing.Design.IToolboxService
type ToolboxService = class
    interface IToolboxService
    interface IComponentDiscoveryService
[<System.Security.SecurityCritical>]
type ToolboxService = class
    interface IToolboxService
    interface IComponentDiscoveryService
Public MustInherit Class ToolboxService
Implements IComponentDiscoveryService, IToolboxService
Inheritance
ToolboxService
Attributes
Implements

Remarks

The ToolboxService class is a partial implementation of the IToolboxService interface. To use this implementation you must derive from this class and implement the abstract methods. Once implemented, you may add this class to your designer application's service container. There should be one toolbox service for each designer application.

ToolboxService provides much of the complex logic of creating a toolbox service, but requires that you define the storage containers for categories and items. This allows for simple toolboxes or very complex ones.

Constructors

ToolboxService()

Initializes a new instance of the ToolboxService class.

Properties

CategoryNames

Gets a collection of strings depicting available categories of the toolbox.

SelectedCategory

Gets or sets the name of the currently selected category.

SelectedItemContainer

Gets or sets the currently selected item container.

Methods

CreateItemContainer(IDataObject)

Creates a new toolbox item container from a saved data object.

CreateItemContainer(ToolboxItem, IDesignerHost)

Creates a new toolbox item container from a toolbox item.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
FilterChanged()

Occurs when the toolbox service detects that the active designer's toolbox item filter has changed.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetItemContainers()

Returns an IList containing all items on the toolbox.

GetItemContainers(String)

Returns an IList containing all items in a given category.

GetToolboxItem(Type, Boolean)

Returns a toolbox item for a given type.

GetToolboxItem(Type)

Returns a toolbox item for a given type.

GetToolboxItems(Assembly, String, Boolean)

Returns an ICollection of ToolboxItem objects for the given assembly.

GetToolboxItems(Assembly, String)

Returns an ICollection containing all the toolbox items in the given assembly.

GetToolboxItems(AssemblyName, Boolean)

Returns an ICollection of ToolboxItem objects for the given assembly.

GetToolboxItems(AssemblyName)

Returns an ICollection of ToolboxItem objects for the given assembly.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
IsItemContainer(IDataObject, IDesignerHost)

Returns a value indicating whether the given data object represents an item container.

IsItemContainerSupported(ToolboxItemContainer, IDesignerHost)

Determines whether the toolbox item container is supported by the given designer host.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Refresh()

Refreshes the state of the toolbox items.

SelectedItemContainerUsed()

Receives a call from the toolbox service when a user reports that a selected toolbox item has been used.

SetCursor()

Sets the current application's cursor to a cursor that represents the currently selected tool.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
UnloadToolboxItems()

Unloads any assemblies that were locked as a result of calling the GetToolboxItems method.

Explicit Interface Implementations

IComponentDiscoveryService.GetComponentTypes(IDesignerHost, Type)

Gets the list of available component types.

IToolboxService.AddCreator(ToolboxItemCreatorCallback, String, IDesignerHost)

For a description of this member, see the AddCreator(ToolboxItemCreatorCallback, String, IDesignerHost) method.

IToolboxService.AddCreator(ToolboxItemCreatorCallback, String)

For a description of this member, see the AddCreator(ToolboxItemCreatorCallback, String) method.

IToolboxService.AddLinkedToolboxItem(ToolboxItem, IDesignerHost)

For a description of this member, see the AddLinkedToolboxItem(ToolboxItem, IDesignerHost) method.

IToolboxService.AddLinkedToolboxItem(ToolboxItem, String, IDesignerHost)

For a description of this member, see the AddLinkedToolboxItem(ToolboxItem, String, IDesignerHost) method.

IToolboxService.AddToolboxItem(ToolboxItem, String)

For a description of this member, see the AddToolboxItem(ToolboxItem, String) method.

IToolboxService.AddToolboxItem(ToolboxItem)

For a description of this member, see the AddToolboxItem(ToolboxItem) method.

IToolboxService.CategoryNames

For a description of this member, see the CategoryNames property.

IToolboxService.DeserializeToolboxItem(Object, IDesignerHost)

For a description of this member, see the DeserializeToolboxItem(Object, IDesignerHost) method.

IToolboxService.DeserializeToolboxItem(Object)

For a description of this member, see the DeserializeToolboxItem(Object) method.

IToolboxService.GetSelectedToolboxItem()

For a description of this member, see the GetSelectedToolboxItem method.

IToolboxService.GetSelectedToolboxItem(IDesignerHost)

For a description of this member, see the GetSelectedToolboxItem(IDesignerHost) method.

IToolboxService.GetToolboxItems()

Gets the entire collection of toolbox items from the toolbox.

IToolboxService.GetToolboxItems(IDesignerHost)

Gets the collection of toolbox items that are associated with the specified designer host from the toolbox.

IToolboxService.GetToolboxItems(String, IDesignerHost)

Gets the collection of toolbox items that are associated with the specified designer host and category from the toolbox.

IToolboxService.GetToolboxItems(String)

Gets a collection of toolbox items from the toolbox that match the specified category.

IToolboxService.IsSupported(Object, ICollection)

Gets a value indicating whether the specified object, which represents a serialized toolbox item, matches the specified attributes.

IToolboxService.IsSupported(Object, IDesignerHost)

Gets a value indicating whether the specified object, which represents a serialized toolbox item, can be used by the specified designer host.

IToolboxService.IsToolboxItem(Object, IDesignerHost)

Gets a value indicating whether the specified object is a serialized toolbox item by using the specified designer host.

IToolboxService.IsToolboxItem(Object)

Gets a value indicating whether the specified object is a serialized toolbox item.

IToolboxService.Refresh()

Refreshes the state of the toolbox items.

IToolboxService.RemoveCreator(String, IDesignerHost)

Removes a previously added toolbox creator that is associated with the specified data format and the specified designer host.

IToolboxService.RemoveCreator(String)

Removes a previously added toolbox item creator of the specified data format.

IToolboxService.RemoveToolboxItem(ToolboxItem, String)

Removes the specified toolbox item from the toolbox.

IToolboxService.RemoveToolboxItem(ToolboxItem)

Removes the specified toolbox item from the toolbox.

IToolboxService.SelectedCategory

For a description of this member, see the SelectedCategory property.

IToolboxService.SelectedToolboxItemUsed()

Notifies the toolbox service that the selected tool has been used.

IToolboxService.SerializeToolboxItem(ToolboxItem)

Gets a serializable object that represents the specified toolbox item.

IToolboxService.SetCursor()

Sets the current application's cursor to a cursor that represents the currently selected tool.

IToolboxService.SetSelectedToolboxItem(ToolboxItem)

Selects the specified toolbox item.

Applies to

See also