CreationTool Class
A tool that is used to create new instances of objects on the designer.
Inheritance Hierarchy
System.Object
Microsoft.Windows.Design.ContextItem
Microsoft.Windows.Design.Interaction.Tool
Microsoft.Windows.Design.Interaction.CreationTool
Namespace: Microsoft.Windows.Design.Interaction
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public Class CreationTool _
Inherits Tool
public class CreationTool : Tool
public ref class CreationTool : public Tool
type CreationTool =
class
inherit Tool
end
public class CreationTool extends Tool
The CreationTool type exposes the following members.
Constructors
Name | Description | |
---|---|---|
CreationTool | Initializes a new instance of the CreationTool class. |
Top
Properties
Name | Description | |
---|---|---|
Context | Gets the editing context for code within the tool. (Inherited from Tool.) | |
CreationType | Gets or sets the type of object this tool should create. | |
Cursor | Gets or sets the default cursor for the mouse. (Inherited from Tool.) | |
FocusedTask | Gets the currently focused task, if one exists. (Inherited from Tool.) | |
ItemType | Gets the type of the tool. (Inherited from Tool.) | |
Tasks | Gets the set of tasks this tool provides. (Inherited from Tool.) |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnActivate | Called when a tool is activated. (Inherited from Tool.) | |
OnCreationComplete | Raises the CreationComplete event. | |
OnDeactivate | Called when a tool is being deactivated. (Inherited from Tool.) | |
OnItemChanged | Adds activate and deactivate semantics to the Tool class. (Inherited from Tool.) | |
PerformCreationComplete | Raises the CreationComplete event. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Events
Name | Description | |
---|---|---|
CreationComplete | Occurs when the tool completes the creation of its object. |
Top
Remarks
To use the CreationTool class, create it and set the CreationType property to the type you want to create. To write a task that uses the CreationTool, retrieve it from the editing context and use the NewItemFactory and ItemParent classes to create an item of type CreationType.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.Windows.Design.Interaction Namespace