GoXam for WPF v3
ReplaceMouseTool<T> Method
Northwoods.GoXam Namespace > Diagram Class : ReplaceMouseTool<T> Method
this must implement Northwoods.GoXam.Tool.IDiagramTool
If the new value is null, any tool that the search finds will just be removed from the list in which it was found.
If true, a matching tool may be a subclass of T; otherwise the tool must be of exactly the same type.
Replace a mouse tool of a given type with a new tool.
Syntax
public T ReplaceMouseTool<T>( 
   IDiagramTool newtool,
   bool subclass
)
where T: IDiagramTool

Parameters

newtool
If the new value is null, any tool that the search finds will just be removed from the list in which it was found.
subclass
If true, a matching tool may be a subclass of T; otherwise the tool must be of exactly the same type.

Type Parameters

T
this must implement Northwoods.GoXam.Tool.IDiagramTool

Return Value

the old tool that was replaced by the new one
Remarks
This searches the MouseDownTools, MouseMoveTools, and MouseUpTools lists. The new tool is inserted into the same list in which a matching tool is found, at the same position as the old tool.
See Also

Reference

Diagram Class
Diagram Members