New to Telerik UI for WinFormsStart a free 30-day trial

Base class for Diagram tools.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public abstract class ToolBase : ITool

Inheritance: objectToolBase

Derived Classes: ConnectionManipulationToolDraggingToolManipulationToolPrimaryMouseToolBaseRectangleSelectionTool

Implements: ITool

Constructors

Initializes a new instance of the ToolBase class.

C#
protected ToolBase(string name = "")
Parameters:namestring

The name.

Properties

Gets or sets the cursor.

C#
protected Cursor Cursor { get; set; }
Property Value:

The cursor.

Gets or sets the graph view (aka surface).

C#
public IGraphInternal Graph { get; }
Property Value:

The surface.

Implements: ITool.Graph

Gets the initial point of the interaction.

C#
protected Point? InitialPoint { get; set; }
Property Value:

The initial point on the surface.

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

C#
public bool IsActive { get; }
Property Value:

True if this instance is active; otherwise, false.

Implements: ITool.IsActive

Gets or sets the IsEnabled.

C#
public bool IsEnabled { get; set; }

Implements: ITool.IsEnabled

Gets or sets the layer.

C#
public string Name { get; set; }

Implements: ITool.Name

Gets or sets the tool service (see ToolService).

C#
public IToolService ToolService { get; set; }
Property Value:

The tool service.

Implements: ITool.ToolService

Methods

Activates the tool.

C#
public bool ActivateTool()
Returns:

bool

Implements: ITool.ActivateTool()

Deactivates the tool.

C#
public bool DeactivateTool()
Returns:

bool

Implements: ITool.DeactivateTool()

Initializes this tool.

C#
public virtual void Initialize(IGraphServiceLocator serviceLocator)
Parameters:serviceLocatorIGraphServiceLocator

The locator or controller.

Implements: ITool.Initialize(IGraphServiceLocator)

Called when tool is IsActive is changed to true.

C#
protected virtual void OnActivated()

Called when tool is IsActive is changed to false.

C#
protected virtual void OnDeactivated()

Restores the cursor.

C#
protected void RestoreCursor()