Version

Configuring the Mouse Tool and Default Drag Interaction (xamDiagram)

Topic Overview

Purpose

This topic explains how to configure the mouse interaction and tool for the xamDiagram™ surface.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic provides a conceptual overview of the xamDiagram control and its main features and capabilities.

This topic explains how to add the xamDiagram control to a WPF application.

Introduction

Mouse interaction and tools summary

The xamDiagram provides two properties – Tool and DefaultDragInteraction for configuring the various ways in which the mouse interacts with the xamDiagram . The Tool setting determines what happens when performing a click and drag on the xamDiagram surface. The following tools are available:

  • Pointer (default)

  • Connector

The Pointer tool allows a number of interactions controlled by the DefaultDragInteraction setting. The supported interactions are:

  • None

  • Zoom

  • Pan

  • Select (default)

The Connector tool allows drawing a connection by dragging the mouse over the diagram surface.

Note
Note:

In order to control when to display connection points for a node, use the ConnectionPointsDisplayMode property. For details on using this property, refer to Configuring the Connection Points of the Diagram Nodes.

Mouse interaction and tools summary chart

The following table maps the desired mouse interaction to the property settings that manage it.

In order to: Use this property: And set it to:

Configure the mouse tool

One of the members of the DiagramTool enumeration

Configure the interaction for the pointer tool

One of the members of the DiagramDragInteraction enumeration

Configuring the Mouse Interaction

Overview

To set the desired mouse interaction, specify the corresponding enum values as the values of the Tool and DefaultDragInteraction properties.

Property settings

The following table maps the desired configuration to the property settings that manage it.

In order to do the following when dragging: Set the Tool to: Set the DefaultDragInteraction to:

Nothing

“Pointer”

“None”

Zoom in

“Pointer”

“Zoom”

Pan

“Pointer”

Pan

Perform a rectangular select

“Pointer”

Select

Draw a connection

Connector

Not Applicable

Related Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic explains how to configure the connection points of diagram nodes in the xamDiagram control; only necessary when using custom nodes or needing to customize the pre-set connection points of the standard nodes.

This topic explains how to configure the connection points of diagram nodes in the xamDiagram control; only necessary when using custom nodes or needing to customize the pre-set connection points of the standard nodes.