windowsforms-120271-controls-and-libraries-diagrams-diagram-items-managing-items-interaction.md
The Diagram control provides a set of properties that allow you to restrict end-users from performing certain operations with diagram items.
You can modify the properties of existing diagram items by accessing them using the DiagramControl.Items collection. Alternatively, use the DiagramControl.ItemCreating event to modify the properties of an item that is about to be created.
|
Operation
|
Item’s Property
|
Diagram’s Property
| | --- | --- | --- | |
Attaching connectors
|
DiagramItem.CanAttachConnectorBeginPoint
DiagramItem.CanAttachConnectorEndPoint
| | |
Copying
|
|
DiagramOptionsProtection.AllowCopyItems
| |
Deleting
|
|
DiagramOptionsProtection.AllowAddRemoveItems
| |
Editing the text
|
|
DiagramOptionsProtection.AllowEditItems
| |
Hiding subordinate items
|
DiagramItem.CanHideSubordinates
| | |
Moving
|
|
DiagramOptionsProtection.AllowMoveItems
| |
Moving with subordinate items
|
DiagramItem.MoveWithSubordinates
|
DiagramOptionsProtection.AllowMoveItems
| |
Placing in/out of a container
|
|
DiagramOptionsProtection.AllowMoveItems
| |
Resizing
|
|
DiagramOptionsProtection.AllowResizeItems
| |
Rotating
|
|
DiagramOptionsProtection.AllowRotateItems
| |
Selecting
|
| | |
Snapping
|
DiagramItem.CanSnapToOtherItems
| | |
Transforming
|
DiagramShape.CanChangeParameter
|
DiagramOptionsProtection.AllowChangeShapesParameter
|
|
Operation
|
Item’s Property
|
Diagram’s Property
| | --- | --- | --- | |
Copying
|
|
DiagramOptionsProtection.AllowCopyItems
| |
Deleting
|
|
DiagramOptionsProtection.AllowAddRemoveItems
| |
Dragging the begin and end points
|
DiagramConnector.CanDragBeginPoint
DiagramConnector.CanDragEndPoint
|
DiagramOptionsProtection.AllowResizeItems
DiagramOptionsProtection.AllowAttachDetachConnectors
| |
Dragging intermediate points
|
DiagramConnector.CanChangeRoute
|
DiagramOptionsProtection.AllowChangeConnectorsRoute
| |
Editing the text
|
|
DiagramOptionsProtection.AllowEditItems
| |
Moving
|
|
DiagramOptionsProtection.AllowMoveItems
| |
Placing in/out of a container
|
|
DiagramOptionsProtection.AllowMoveItems
| |
Selecting
|
| |
|
Operation
|
Item’s Property
|
Diagram’s Property
| | --- | --- | --- | |
Adding items to the container
|
| | |
Attaching connectors
|
DiagramItem.CanAttachConnectorBeginPoint
DiagramItem.CanAttachConnectorEndPoint
| | |
Copying
|
|
DiagramOptionsProtection.AllowCopyItems
| |
Deleting
|
|
DiagramOptionsProtection.AllowAddRemoveItems
| |
Editing the header text
|
|
DiagramOptionsProtection.AllowEditItems
| |
Hiding subordinate items
|
DiagramItem.CanHideSubordinates
| | |
Moving
|
|
DiagramOptionsProtection.AllowMoveItems
| |
Moving with subordinate items
|
DiagramItem.MoveWithSubordinates
|
DiagramOptionsProtection.AllowMoveItems
| |
Placing in/out of another container
|
|
DiagramOptionsProtection.AllowMoveItems
| |
Resizing
|
|
DiagramOptionsProtection.AllowResizeItems
| |
Rotating
|
|
DiagramOptionsProtection.AllowRotateItems
| |
Selecting
|
| | |
Snapping
|
DiagramItem.CanSnapToOtherItems
| |
Use the following properties to restrict operations with child items of a DiagramContainer. These properties have a lower priority than corresponding properties of the child items.
See Also