Class
ToolBase

Base class for Diagram tools.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public abstract class ToolBase : ITool

Inheritance: objectToolBase

Derived Classes: ShapeToolConnectionManipulationToolDraggingToolManipulationToolPrimaryMouseToolBaseRectangleSelectionTool

Implements: ITool

Constructors

ToolBase(string)

Initializes a new instance of the ToolBase class.

Declaration

cs-api-definition
protected ToolBase(string name = "")

Parameters

name

string

The name.

Properties

Cursor

Gets or sets the cursor.

Declaration

cs-api-definition
protected Cursor Cursor { get; set; }

Property Value

Cursor

The cursor.

Graph

Gets or sets the graph view (aka surface).

Declaration

cs-api-definition
public IGraphInternal Graph { get; }

Property Value

IGraphInternal

The surface.

Implements ITool.Graph

InitialPoint

Gets the initial point of the interaction.

Declaration

cs-api-definition
protected Point? InitialPoint { get; set; }

Property Value

Point?

The initial point on the surface.

IsActive

Gets or sets a value indicating whether this tool is active.

Declaration

cs-api-definition
public bool IsActive { get; }

Property Value

bool

True if this instance is active; otherwise, false.

Implements ITool.IsActive

IsEnabled

Gets or sets the IsEnabled.

Declaration

cs-api-definition
public bool IsEnabled { get; set; }

Property Value

bool

Implements ITool.IsEnabled

Name

Gets or sets the layer.

Declaration

cs-api-definition
public string Name { get; set; }

Property Value

string

Implements ITool.Name

ToolService

Gets or sets the tool service (see ToolService).

Declaration

cs-api-definition
public IToolService ToolService { get; set; }

Property Value

IToolService

The tool service.

Implements ITool.ToolService

Methods

ActivateTool()

Activates the tool.

Declaration

cs-api-definition
public bool ActivateTool()

Returns

bool

Implements ITool.ActivateTool()

DeactivateTool()

Deactivates the tool.

Declaration

cs-api-definition
public bool DeactivateTool()

Returns

bool

Implements ITool.DeactivateTool()

Initialize(IGraphServiceLocator)

Initializes this tool.

Declaration

cs-api-definition
public virtual void Initialize(IGraphServiceLocator serviceLocator)

Parameters

serviceLocator

IGraphServiceLocator

The locator or controller.

Implements ITool.Initialize(IGraphServiceLocator)

OnActivated()

Called when tool is IsActive is changed to true.

Declaration

cs-api-definition
protected virtual void OnActivated()

OnDeactivated()

Called when tool is IsActive is changed to false.

Declaration

cs-api-definition
protected virtual void OnDeactivated()

RestoreCursor()

Restores the cursor.

Declaration

cs-api-definition
protected void RestoreCursor()