Class
HitTestService

Service handling the hit-testing of diagram elements.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public class HitTestService : GraphServiceBase, IHitTestService

Inheritance: objectGraphServiceBaseHitTestService

Implements: IHitTestService

Inherited Members GraphServiceBase.Graph

Constructors

HitTestService(IGraphInternal)

Initializes a new instance of the HitTestService class.

Declaration

cs-api-definition
public HitTestService(IGraphInternal graph)

Parameters

graph

IGraphInternal

The graph.

Properties

ItemUnderMouse

Gets the item under the mouse.

Declaration

cs-api-definition
public IDiagramItem ItemUnderMouse { get; }

Property Value

IDiagramItem

Implements IHitTestService.ItemUnderMouse

ShapeUnderMouse

Gets the shape under mouse.

Declaration

cs-api-definition
public IShape ShapeUnderMouse { get; }

Property Value

IShape

Implements IHitTestService.ShapeUnderMouse

Methods

GetConnectionsUnderRect(Rect)

Gets the connections intersecting the specific rectangle.

Declaration

cs-api-definition
public IEnumerable<IConnection> GetConnectionsUnderRect(Rect rect)

Parameters

rect

Rect

Returns

IEnumerable<IConnection>

Implements IHitTestService.GetConnectionsUnderRect(Rect)

GetItemsNearPoint(Point, double)

Gets the items near point.

Declaration

cs-api-definition
public IEnumerable<IDiagramItem> GetItemsNearPoint(Point point, double delta)

Parameters

point

Point

The point.

delta

double

The delta.

Returns

IEnumerable<IDiagramItem>

Implements IHitTestService.GetItemsNearPoint(Point, double)

GetItemsUnderRect(Rect)

Gets the items under rectangle.

Declaration

cs-api-definition
public IEnumerable<IDiagramItem> GetItemsUnderRect(Rect rect)

Parameters

rect

Rect

The rectangle.

Returns

IEnumerable<IDiagramItem>

Implements IHitTestService.GetItemsUnderRect(Rect)

GetShapesNearPoint(Point, double)

Gets the shapes near point within some delta distance.

Declaration

cs-api-definition
public IEnumerable<IShape> GetShapesNearPoint(Point point, double delta)

Parameters

point

Point

The point.

delta

double

The delta.

Returns

IEnumerable<IShape>

Implements IHitTestService.GetShapesNearPoint(Point, double)

GetShapesUnderRect(Rect)

Gets the shapes under rectangle.

Declaration

cs-api-definition
public IEnumerable<IShape> GetShapesUnderRect(Rect rect)

Parameters

rect

Rect

The rectangle.

Returns

IEnumerable<IShape>

Implements IHitTestService.GetShapesUnderRect(Rect)

GetTopItemNearPoint(Point, double)

Gets the topmost item under point.

Declaration

cs-api-definition
public IDiagramItem GetTopItemNearPoint(Point point, double delta)

Parameters

point

Point

The point.

delta

double

The delta.

Returns

IDiagramItem

Implements IHitTestService.GetTopItemNearPoint(Point, double)

GetTopShapesUnderPoint(Point)

Gets the shapes under point.

Declaration

cs-api-definition
public IEnumerable<IShape> GetTopShapesUnderPoint(Point point)

Parameters

point

Point

The point.

Returns

IEnumerable<IShape>

Implements IHitTestService.GetTopShapesUnderPoint(Point)