Class
ShapeTool

A Mouse tool which can be used to create different geometry shapes.

Definition

Namespace:Telerik.Windows.Controls.Diagrams.Ribbon

Assembly:Telerik.Windows.Controls.Diagrams.Ribbon.dll

Syntax:

cs-api-definition
public class ShapeTool : ToolBase, ITool, IMouseListener

Inheritance: objectToolBaseShapeTool

Implements: IMouseListenerITool

Inherited Members ToolBase.DeactivateTool()ToolBase.ActivateTool()ToolBase.OnActivated()ToolBase.OnDeactivated()ToolBase.RestoreCursor()ToolBase.ToolServiceToolBase.GraphToolBase.IsEnabledToolBase.IsActiveToolBase.NameToolBase.InitialPointToolBase.Cursor

Constructors

ShapeTool()

Initializes a new instance of the ShapeTool class.

Declaration

cs-api-definition
public ShapeTool()

Properties

AddShapeCommand

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

Declaration

cs-api-definition
protected CompositeCommand AddShapeCommand { get; set; }

Property Value

CompositeCommand

Geometry

The geometry of the shape which the tool creates.

Declaration

cs-api-definition
public Geometry Geometry { get; set; }

Property Value

Geometry

ServiceLocator

Graph service locator.

Declaration

cs-api-definition
protected IGraphServiceLocator ServiceLocator { get; set; }

Property Value

IGraphServiceLocator

Methods

CreateShape()

Creates a shape via controller which checks if GraphSource is used.

Declaration

cs-api-definition
protected IGeometryShape CreateShape()

Returns

IGeometryShape

Initialize(IGraphServiceLocator)

Initializes this tool.

Declaration

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

Parameters

serviceLocator

IGraphServiceLocator

The locator or controller.

Overrides ToolBase.Initialize(IGraphServiceLocator)

MouseDoubleClick(PointerArgs)

Handles the mouse double click event.

Declaration

cs-api-definition
public bool MouseDoubleClick(PointerArgs e)

Parameters

e

PointerArgs

The PointerArgs instance containing the event data.

Returns

bool

Implements IMouseListener.MouseDoubleClick(PointerArgs)

MouseDown(PointerArgs)

Handles the mouse-down event.

Declaration

cs-api-definition
public bool MouseDown(PointerArgs e)

Parameters

e

PointerArgs

The PointerArgs instance containing the event data.

Returns

bool

Implements IMouseListener.MouseDown(PointerArgs)

MouseMove(PointerArgs)

Handles the mouse-move event.

Declaration

cs-api-definition
public bool MouseMove(PointerArgs e)

Parameters

e

PointerArgs

The PointerArgs instance containing the event data.

Returns

bool

Implements IMouseListener.MouseMove(PointerArgs)

MouseUp(PointerArgs)

Handles the mouse-up event.

Declaration

cs-api-definition
public bool MouseUp(PointerArgs e)

Parameters

e

PointerArgs

The PointerArgs instance containing the event data.

Returns

bool

Implements IMouseListener.MouseUp(PointerArgs)