DragSelectingTool

StockSharp.Xaml.Diagram.GXDiagram.Tool

The DragSelectingTool lets the user select multiple parts within a rectangular area drawn by the user.

Наследует: DiagramTool

Свойства

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.

Delay : int

Gets or sets how long the mouse must be stationary before CanStart may return true.

Include : SearchInclusion

Gets or sets the conditions under which parts are selected.

Методы

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.

CreateBox() : Node

Create a Node using BoxTemplate as its DataTemplate.

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.

SelectInRect(Rect)

This method is called to select some parts, governed by the value of Include.

r

Поля

BoxTemplateProperty : DependencyProperty

Identifies the BoxTemplate dependency property.

DelayProperty : DependencyProperty

Identifies the Delay dependency property.

IncludeProperty : DependencyProperty

Identifies the Include dependency property.