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
Public method CreationTool Initializes a new instance of the CreationTool class.

Top

Properties

  Name Description
Protected property Context Gets the editing context for code within the tool. (Inherited from Tool.)
Public property CreationType Gets or sets the type of object this tool should create.
Public property Cursor Gets or sets the default cursor for the mouse. (Inherited from Tool.)
Public property FocusedTask Gets the currently focused task, if one exists. (Inherited from Tool.)
Public property ItemType Gets the type of the tool. (Inherited from Tool.)
Public property Tasks Gets the set of tasks this tool provides. (Inherited from Tool.)

Top

Methods

  Name Description
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnActivate Called when a tool is activated. (Inherited from Tool.)
Protected method OnCreationComplete Raises the CreationComplete event.
Protected method OnDeactivate Called when a tool is being deactivated. (Inherited from Tool.)
Protected method OnItemChanged Adds activate and deactivate semantics to the Tool class. (Inherited from Tool.)
Public method PerformCreationComplete Raises the CreationComplete event.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event 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

Other Resources

Understanding WPF Designer Extensibility