Class CombinedSelectionCommand
- Namespace
- HelixToolkit.Wpf
- Assembly
- HelixToolkit.Wpf.dll
Provides a command that raises an event returning the hit models at the mouse location when the mouse button is clicked
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 CombinedSelectionCommand : SelectionCommand, ICommand
- Inheritance
-
CombinedSelectionCommand
- Implements
- Inherited Members
Constructors
CombinedSelectionCommand(Viewport3D, EventHandler<ModelsSelectedEventArgs>)
Initializes a new instance of the RectangleSelectionCommand class.
public CombinedSelectionCommand(Viewport3D viewport, EventHandler<ModelsSelectedEventArgs> modelsSelectedEventHandler)
Parameters
viewportViewport3DThe viewport.
modelsSelectedEventHandlerEventHandler<ModelsSelectedEventArgs>The selection event handler.
CombinedSelectionCommand(Viewport3D, EventHandler<ModelsSelectedEventArgs>, EventHandler<VisualsSelectedEventArgs>)
Initializes a new instance of the RectangleSelectionCommand class.
public CombinedSelectionCommand(Viewport3D viewport, EventHandler<ModelsSelectedEventArgs> modelsSelectedEventHandler, EventHandler<VisualsSelectedEventArgs> visualsSelectedEventHandler)
Parameters
viewportViewport3DThe viewport.
modelsSelectedEventHandlerEventHandler<ModelsSelectedEventArgs>The selection event handler.
visualsSelectedEventHandlerEventHandler<VisualsSelectedEventArgs>The selection event handler.
CombinedSelectionCommand(Viewport3D, EventHandler<VisualsSelectedEventArgs>)
Initializes a new instance of the RectangleSelectionCommand class.
public CombinedSelectionCommand(Viewport3D viewport, EventHandler<VisualsSelectedEventArgs> visualsSelectedEventHandler)
Parameters
viewportViewport3DThe viewport.
visualsSelectedEventHandlerEventHandler<VisualsSelectedEventArgs>The selection event handler.
Properties
AllowAutoSetSelectionHitMode
Allow auto detect SelectionHitMode by mouse position
Default value is true
public bool AllowAutoSetSelectionHitMode { get; set; }
Property Value
Remarks
If mouse dragged from left to right: SelectionHitMode = SelectionHitMode.Inside
Other SelectionHitMode = SelectionHitMode.Touch
FillRectangleBrush
The brush to color inside the rectangle.
public Brush? FillRectangleBrush { get; set; }
Property Value
PointSize
The size of selection point.
public Size PointSize { 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.