Table of Contents

Class RectangleSelectionCommand

Namespace
HelixToolkit.Wpf
Assembly
HelixToolkit.Wpf.dll

Provides a command that shows a rectangle when the mouse is dragged and raises an event returning the models contained in the rectangle when the mouse button is released.

public sealed class RectangleSelectionCommand : SelectionCommand, ICommand
Inheritance
RectangleSelectionCommand
Implements
Inherited Members

Constructors

RectangleSelectionCommand(Viewport3D, EventHandler<ModelsSelectedEventArgs>)

Initializes a new instance of the RectangleSelectionCommand class.

public RectangleSelectionCommand(Viewport3D viewport, EventHandler<ModelsSelectedEventArgs> modelsSelectedEventHandler)

Parameters

viewport Viewport3D

The viewport.

modelsSelectedEventHandler EventHandler<ModelsSelectedEventArgs>

The selection event handler.

RectangleSelectionCommand(Viewport3D, EventHandler<ModelsSelectedEventArgs>, EventHandler<VisualsSelectedEventArgs>)

Initializes a new instance of the RectangleSelectionCommand class.

public RectangleSelectionCommand(Viewport3D viewport, EventHandler<ModelsSelectedEventArgs> modelsSelectedEventHandler, EventHandler<VisualsSelectedEventArgs> visualsSelectedEventHandler)

Parameters

viewport Viewport3D

The viewport.

modelsSelectedEventHandler EventHandler<ModelsSelectedEventArgs>

The selection event handler.

visualsSelectedEventHandler EventHandler<VisualsSelectedEventArgs>

The selection event handler.

RectangleSelectionCommand(Viewport3D, EventHandler<VisualsSelectedEventArgs>)

Initializes a new instance of the RectangleSelectionCommand class.

public RectangleSelectionCommand(Viewport3D viewport, EventHandler<VisualsSelectedEventArgs> visualsSelectedEventHandler)

Parameters

viewport Viewport3D

The viewport.

visualsSelectedEventHandler EventHandler<VisualsSelectedEventArgs>

The selection event handler.

Properties

FillRectangleBrush

The brush to color inside the rectangle.

public Brush? FillRectangleBrush { get; set; }

Property Value

Brush

Methods

Completed(ManipulationEventArgs)

The customized complete operation when the manipulation is completed.

protected override void Completed(ManipulationEventArgs e)

Parameters

e ManipulationEventArgs

The ManipulationEventArgs instance containing the event data.

Delta(ManipulationEventArgs)

Occurs when the position is changed during a manipulation.

protected override void Delta(ManipulationEventArgs e)

Parameters

e ManipulationEventArgs

The ManipulationEventArgs instance containing the event data.

GetCursor()

Gets the cursor for the gesture.

protected override Cursor GetCursor()

Returns

Cursor

A cursor.

Started(ManipulationEventArgs)

Occurs when the manipulation is started.

protected override void Started(ManipulationEventArgs e)

Parameters

e ManipulationEventArgs

The ManipulationEventArgs instance containing the event data.