T
this must implement IDiagramTool
Northwoods.GoSilverlight 1.2.2 Assembly
ReplaceMouseTool<T> Method
See Also  Send Feedback
Northwoods.GoXam Namespace > Diagram Class : ReplaceMouseTool<T> Method

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.
Replace a mouse tool of a given type with a new tool.

Syntax

Visual Basic (Declaration) 
Public Function ReplaceMouseTool(Of T As IDiagramTool)( _
   ByVal newtool As IDiagramTool, _
   ByVal subclass As Boolean _
) As T
C# 
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 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.

Requirements

See Also

© 2010 All Rights Reserved.