DragSelectingTool
The DragSelectingTool lets the user select multiple parts within a rectangular area drawn by the user.
Inherits: DiagramTool
Properties
Box : Node
Gets or sets the temporary node acting as the "rubber-band" box that the user is stretching with a mouse drag.
BoxTemplate : DataTemplate
Gets or sets the DataTemplate that renders the "rubber-band" box that the user draws to specify the selection area.
Include : SearchInclusion
Gets or sets the conditions under which parts are selected.
Methods
CanStart() : bool
This tool can run when the diagram allows selection, there has been delay of at least Delay milliseconds after the mouse-down before a mouse-move, there has been a mouse-drag far enough away not to be a click, and there is no selectable part at the mouse-down point.
ComputeBoxBounds() : Rect
This just returns a Rect stretching from the mouse-down point to the current mouse point.
DoActivate()
Call CreateBox to create the "rubber-band" box, remember it as the Box property, and add it to the diagram's PartsModel.
DoDeactivate()
Cleanup any Box.
DoMouseMove()
While dragging the mouse, position and size the Box according to the bounds produced by ComputeBoxBounds.
DoMouseUp()
Upon the mouse-up, call Rect) with the value of ComputeBoxBounds and stop this tool.
DoStart()
Capture the mouse when starting this tool.
DoStop()
Release the mouse capture when stopping this tool.
Fields
BoxTemplateProperty : DependencyProperty
Identifies the BoxTemplate dependency property.
DelayProperty : DependencyProperty
Identifies the Delay dependency property.
IncludeProperty : DependencyProperty
Identifies the Include dependency property.