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

Abstract base class for tools which draw something on the canvas.

Definition

Constructors

Initializes a new instance of the DrawingToolBase class.

C#
protected DrawingToolBase(string name)
Parameters:namestring

Properties

Gets or sets the ICommand for adding a shape to the diagram.

C#
protected CompositeCommand AddShapeCommand { get; set; }

Gets the IControllerService service.

C#
public IControllerService ControllerService { get; }

Gets the IDrawingService service.

C#
public IDrawingService DrawingService { get; }

Gets the IUndoRedoService service.

C#
public IUndoRedoService UndoRedoService { get; }

Methods

Completes the action of this tool.

C#
public virtual void CompleteTool()

Creates a shape.

C#
protected IGeometryShape CreateShape()
Returns:

IGeometryShape

Handles the key down event.

C#
public override bool KeyDown(KeyArgs key)
Parameters:keyKeyArgsReturns:

bool

Overrides: PrimaryMouseToolBase.KeyDown(KeyArgs)

Handles the mouse-down event.

C#
public override bool MouseDown(PointerArgs e)
Parameters:ePointerArgs

The PointerArgs instance containing the event data.

Returns:

bool

Overrides: PrimaryMouseToolBase.MouseDown(PointerArgs)

Called when tool is IsActive is changed to false.

C#
protected override void OnDeactivated()

Overrides: ToolBase.OnDeactivated()

Undoes what this tool has performed.

C#
public virtual void UndoToolAction()