Northwoods.GoSilverlight 1.3.5 Assembly
DragSelectingTool Class
Members  See Also  Send Feedback
Northwoods.GoXam.Tool Namespace : DragSelectingTool Class

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

Syntax

Visual Basic (Declaration) 
Public Class DragSelectingTool 
   Inherits DiagramTool
   Implements IDiagramTool 
C# 
public class DragSelectingTool : DiagramTool, IDiagramTool  

Remarks

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.

Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      System.Windows.UIElement
         System.Windows.FrameworkElement
            Northwoods.GoXam.Tool.DiagramTool
               Northwoods.GoXam.Tool.DragSelectingTool

Requirements

See Also

© 2012 All Rights Reserved.