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

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

Definition

Constructors

Initializes a new instance of the ShapeTool class.

C#
public ShapeTool()

Properties

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

C#
protected CompositeCommand AddShapeCommand { get; set; }

Geometry

Geometry

The geometry of the shape which the tool creates.

C#
public Geometry Geometry { get; set; }

Graph service locator.

C#
protected IGraphServiceLocator ServiceLocator { get; set; }

Methods

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

C#
protected IGeometryShape CreateShape()
Returns:

IGeometryShape

Initializes this tool.

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

The locator or controller.

Overrides: ToolBase.Initialize(IGraphServiceLocator)

Handles the mouse double click event.

C#
public bool MouseDoubleClick(PointerArgs e)
Parameters:ePointerArgs

The PointerArgs instance containing the event data.

Returns:

bool

Implements: IMouseListener.MouseDoubleClick(PointerArgs)

Handles the mouse-down event.

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

The PointerArgs instance containing the event data.

Returns:

bool

Implements: IMouseListener.MouseDown(PointerArgs)

Handles the mouse-move event.

C#
public bool MouseMove(PointerArgs e)
Parameters:ePointerArgs

The PointerArgs instance containing the event data.

Returns:

bool

Implements: IMouseListener.MouseMove(PointerArgs)

Handles the mouse-up event.

C#
public bool MouseUp(PointerArgs e)
Parameters:ePointerArgs

The PointerArgs instance containing the event data.

Returns:

bool

Implements: IMouseListener.MouseUp(PointerArgs)