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
viewportViewport3DThe viewport.
modelsSelectedEventHandlerEventHandler<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
viewportViewport3DThe viewport.
modelsSelectedEventHandlerEventHandler<ModelsSelectedEventArgs>The selection event handler.
visualsSelectedEventHandlerEventHandler<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
viewportViewport3DThe viewport.
visualsSelectedEventHandlerEventHandler<VisualsSelectedEventArgs>The selection event handler.
Properties
FillRectangleBrush
The brush to color inside the rectangle.
public Brush? FillRectangleBrush { get; set; }
Property Value
Methods
Completed(ManipulationEventArgs)
The customized complete operation when the manipulation is completed.
protected override void Completed(ManipulationEventArgs e)
Parameters
eManipulationEventArgsThe ManipulationEventArgs instance containing the event data.
Delta(ManipulationEventArgs)
Occurs when the position is changed during a manipulation.
protected override void Delta(ManipulationEventArgs e)
Parameters
eManipulationEventArgsThe 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
eManipulationEventArgsThe ManipulationEventArgs instance containing the event data.