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