Northwoods.GoXam.Tool Namespace : DragSelectingTool Class |
DragSelectingTool
lets the user select multiple parts within a rectangular area.<DesignTimeVisibleAttribute()> Public Class DragSelectingTool Inherits DiagramTool Implements IDiagramTool, System.ComponentModel.ISupportInitialize, System.Windows.IFrameworkInputElement, System.Windows.IInputElement, System.Windows.Markup.IQueryAmbient, System.Windows.Media.Animation.IAnimatable
This is a standard mouse-move tool.
For example, you can change the selection policy in XAML by: <go:Diagram ...> <go:Diagram.DragSelectingTool> <go:DragSelectingTool Include="Intersects" /> </go:Diagram.DragSelectingTool> </go:Diagram>
Or you can customize the default Northwoods.GoXam.Diagram.DragSelectingTool in code: myDiagram.DragSelectingTool.Include = SearchInclusion.Intersects;
Selection occurs on a mouse up calling SelectInRect with the value of ComputeBoxBounds. If you want real-time selection to occur during the drag: public class RealtimeDragSelectingTool : DragSelectingTool { public override void DoMouseMove() { base.DoMouseMove(); if (this.Active) SelectInRect(ComputeBoxBounds()); } }
and install in XAML by: <go:Diagram ...> <go:Diagram.DragSelectingTool> <local:RealtimeDragSelectingTool Include="Intersects" /> </go:Diagram.DragSelectingTool> </go:Diagram>
Or you can install in code by: myDiagram.DragSelectingTool = new RealtimeDragSelectingTool() { Include = SearchInclusion.Intersects };
This tool does not utilize any Northwoods.GoXam.Adornments or tool handles.
This tool does not edit the model.
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
Northwoods.GoXam.Tool.DiagramTool
Northwoods.GoXam.Tool.DragSelectingTool