Class ToolService
The toolbox, this tells the application which tools are available.
Inherited Members
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public class ToolService : GraphServiceBase, IToolService, IMouseListener, IKeyboardListener
Constructors
ToolService(IGraphInternal, IGraphServiceLocator)
Initializes a new instance of the ToolService class.
Declaration
public ToolService(IGraphInternal graph, IGraphServiceLocator serviceLocator)
Parameters
IGraphInternal
graph
The graph. |
IGraphServiceLocator
serviceLocator
The service locator. |
Properties
ActiveTool
Graph
Gets the graph.
Declaration
public IGraphInternal Graph { get; }
Property Value
IGraphInternal
|
Implements
IsAltDown
Gets or sets whether the alt-key is pressed.
Declaration
public bool IsAltDown { get; set; }
Property Value
System.Boolean
|
Implements
IsControlDown
Gets or sets whether the control-key is pressed.
Declaration
public bool IsControlDown { get; set; }
Property Value
System.Boolean
|
Implements
IsMouseDown
Declaration
public bool IsMouseDown { get; set; }
Property Value
System.Boolean
|
Implements
PrimaryTool
Gets or sets the primary tool.
Declaration
public string PrimaryTool { get; set; }
Property Value
System.String
The primary tool. |
Implements
ToolList
Gets the tools collection.
Declaration
public ObservableCollection<ITool> ToolList { get; }
Property Value
System.Collections.ObjectModel.ObservableCollection<ITool>
|
Methods
ActivatePrimaryTool()
Activates the primary tool.
Declaration
public void ActivatePrimaryTool()
Implements
ActivateTool(String)
Activates the tool.
Declaration
public ITool ActivateTool(string toolName)
Parameters
System.String
toolName
Label of the tool. |
Returns
ITool
|
Implements
DeactivateTool(ITool)
Deactivates the given tool.
Declaration
public bool DeactivateTool(ITool tool)
Parameters
ITool
tool
A registered ITool. |
Returns
System.Boolean
|
Implements
FindTool(String)
Returns the tool with the specified name, if it exists.
Declaration
public ITool FindTool(string name)
Parameters
System.String
name
|
Returns
ITool
|
Implements
KeyDown(KeyArgs)
Handles the key down event.
Declaration
public bool KeyDown(KeyArgs key)
Parameters
KeyArgs
key
|
Returns
System.Boolean
|
Implements
KeyUp(KeyArgs)
Handles the key up event.
Declaration
public bool KeyUp(KeyArgs key)
Parameters
KeyArgs
key
|
Returns
System.Boolean
|
Implements
MouseDoubleClick(PointerArgs)
Handles the mouse double click event.
Declaration
public bool MouseDoubleClick(PointerArgs e)
Parameters
PointerArgs
e
The PointerArgs instance containing the event data. |
Returns
System.Boolean
|
Implements
MouseDown(PointerArgs)
Handles the mouse-down event.
Declaration
public bool MouseDown(PointerArgs e)
Parameters
PointerArgs
e
The PointerArgs instance containing the event data. |
Returns
System.Boolean
|
Implements
MouseMove(PointerArgs)
Handles the mouse-move event.
Declaration
public bool MouseMove(PointerArgs e)
Parameters
PointerArgs
e
The PointerArgs instance containing the event data. |
Returns
System.Boolean
|
Implements
MouseUp(PointerArgs)
Handles the mouse-up event.
Declaration
public bool MouseUp(PointerArgs e)
Parameters
PointerArgs
e
The PointerArgs instance containing the event data. |
Returns
System.Boolean
|