Version

Configuring User Interactions Restrictions (xamDiagram)

Topic Overview

Purpose

This topic provides information on how to restrict certain user interactions of the xamDiagram™ control.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic provides a general overview of the xamDiagram control.

Restrictions Summary

Restriction Summary

This feature allows you to restrict the user from entering edit mode on all or some of the xamDiagram's nodes and connections.

This feature allows you to restrict the user from resizing all or some of the xamDiagram's nodes and connections.

This feature allows you to restrict the user from deleting all or some of the xamDiagram's nodes and connections.

Restrict Editing

By default the control allows editing of all items by either double clicking on a node or by selecting a node and pressing the F2 key or by executing the EnterEditMode command. If you need to restrict the user from editing items on a global level you can set the xamDiagram's AllowEdit boolean property to false. By default this property is set to true.

In addition you can restrict editing on a node level using the AllowEdit nullable boolean property. By default this property is set to null which means the resolved value will be obtained from the xamDiagram's AllowEdit property.

Note
Note

If a diagram item is in editing mode and its AllowEdit property resolves to false this item will immediately exit editing mode. Also the ExitingEditMode event will not be raised as it allows the developer to cancel the exiting.

Restrict Resizing

By default the control allows changing the size of the items through the user interface. If you need to restrict the user from resizing items on a global level you can set the xamDiagram's AllowResize boolean property to false. By default this property is set to true.

In addition you can restrict resizing on an item level using the AllowResize nullable boolean property. By default this property is set to null which means the resolved value will be obtained from the xamDiagram's AllowResize property.

Note
Note

When resizing is disabled for a diagram connection and you move (or resize) the node it is connected to, the connection will still change its size in order to maintain its connection with the node.

Restrict Deleting

By default the control allows deleting of items not only using the Delete key but also when executing the clipboard’s Cut, Undo and Redo commands. If you need to restrict the user from deleting items on a global level you can set the xamDiagram's AllowDelete boolean property to false. By default this property is set to true.

In addition you can restrict deleting on an item level using the AllowDelete nullable boolean property. By default this property is set to null which means the resolved value will be obtained from the xamDiagram's AllowDelete property.

Note
Note

If you perform the following sequence of actions:

  • delete an item

  • undo item deletion

  • restrict node deletion

At this point trying to invoke a redo operation will not succeed because the result of this operation should delete the node again and deletion is already disabled.

Related Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic provides a summary of all user interaction tasks in the xamDiagram control.

This topic explains how to use the commands provided by xamDiagram in UI elements such as menus and buttons.

This topic explains how to use the context menu provided by the xamDiagram control.

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

This topic explains how to change the keyboard shortcuts associated with xamDiagram commands.

This topic explains how to configure the Undo/Redo operations in the xamDiagram control.