Tool Class

Represents a tool that determines the mode of the designer.

Namespace:  Microsoft.Windows.Design.Interaction
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public Class Tool _
    Inherits ContextItem
'Usage
Dim instance As Tool
public class Tool : ContextItem
public ref class Tool : public ContextItem
public class Tool extends ContextItem

Remarks

All user input flows through the currently active tool. To activate a tool, you set it into the editing context's ContextItemManager class. You may also handle change notifications on the ContextItemManager to know when the active tool changes. When user input comes into the designer view, the designer view locates the active tool in the editing context and asks it to resolve the user input into a command binding. The resulting command binding is then invoked.

A tool is composed of a collection of tasks, which are represented by the Task class. Each task contains a collection of commands that may be invoked, and a collection of input bindings that activate those commands. Tools may also use hit testing logic to discover tasks offered by adorners.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Design.ContextItem
    Microsoft.Windows.Design.Interaction.Tool
      Microsoft.Windows.Design.Interaction.CreationTool
      Microsoft.Windows.Design.Interaction.SelectionTool

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

Tool Members

Microsoft.Windows.Design.Interaction Namespace

Other Resources

Tool Architecture

WPF Designer Extensibility Architecture