DragSelectingTool

StockSharp.Xaml.Diagram.GXDiagram.Tool

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

Inherits: DiagramTool

Properties

Box
protected Node Box { get; set; }
value = dragSelectingTool.Box
dragSelectingTool.Box = value

Gets or sets the temporary node acting as the "rubber-band" box that the user is stretching with a mouse drag.

BoxTemplate
public DataTemplate BoxTemplate { get; set; }
value = dragSelectingTool.BoxTemplate
dragSelectingTool.BoxTemplate = value

Gets or sets the DataTemplate that renders the "rubber-band" box that the user draws to specify the selection area.

Delay
public int Delay { get; set; }
value = dragSelectingTool.Delay
dragSelectingTool.Delay = value

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

Include
public SearchInclusion Include { get; set; }
value = dragSelectingTool.Include
dragSelectingTool.Include = value

Gets or sets the conditions under which parts are selected.

Methods

CanStart
public override bool CanStart()
result = dragSelectingTool.CanStart()

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
protected virtual Rect ComputeBoxBounds()
result = dragSelectingTool.ComputeBoxBounds()

This just returns a Rect stretching from the mouse-down point to the current mouse point.

CreateBox
protected virtual Node CreateBox()
result = dragSelectingTool.CreateBox()

Create a Node using BoxTemplate as its DataTemplate.

DoActivate
public override void DoActivate()
dragSelectingTool.DoActivate()

Call CreateBox to create the "rubber-band" box, remember it as the Box property, and add it to the diagram's PartsModel.

DoDeactivate
public override void DoDeactivate()
dragSelectingTool.DoDeactivate()

Cleanup any Box.

DoMouseMove
public override void DoMouseMove()
dragSelectingTool.DoMouseMove()

While dragging the mouse, position and size the Box according to the bounds produced by ComputeBoxBounds.

DoMouseUp
public override void DoMouseUp()
dragSelectingTool.DoMouseUp()

Upon the mouse-up, call Rect) with the value of ComputeBoxBounds and stop this tool.

DoStart
public override void DoStart()
dragSelectingTool.DoStart()

Capture the mouse when starting this tool.

DoStop
public override void DoStop()
dragSelectingTool.DoStop()

Release the mouse capture when stopping this tool.

SelectInRect
public virtual void SelectInRect(Rect r)
dragSelectingTool.SelectInRect(r)

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

r

Fields

BoxTemplateProperty
public static readonly DependencyProperty BoxTemplateProperty
value = DragSelectingTool.BoxTemplateProperty

Identifies the BoxTemplate dependency property.

DelayProperty
public static readonly DependencyProperty DelayProperty
value = DragSelectingTool.DelayProperty

Identifies the Delay dependency property.

IncludeProperty
public static readonly DependencyProperty IncludeProperty
value = DragSelectingTool.IncludeProperty

Identifies the Include dependency property.