Search
DiagramView Class
Remarks See Also
 





A .NET Windows Forms control that displays the content of a Diagram object.

Namespace: MindFusion.Diagramming.WinForms
Assembly: MindFusion.Diagramming.WinForms

 Syntax

C#  Copy Code

public class DiagramView : TouchControl,
    IDiagramView, IResolution, IZoomTarget

Visual Basic  Copy Code

Public Class DiagramView
    Inherits TouchControl
    Implements IDiagramView, IResolution, IZoomTarget

 Remarks

Controlling Users' Actions

Most aspects of user interaction are controlled by the DiagramView class.

The Behavior property specifies how the control responds to user actions with the mouse. To create a custom behavior class, use the CustomBehavior property. To enable creating links or nodes of your custom type interactively by using the CustomLinkType or CustomNodeType properties, set Behavior to Custom

AllowInplaceEdit specifies whether users are allowed to edit in-place the content of a diagram element by double-clicking it. Set InplaceEditAcceptOnEnter to true to accept changes and exit inplace-edit mode by pressing ENTER. The InplaceEditCancelOnEsc property allows setting the inplace editing to be rejected by pressing ESC.

MiddleButtonActions allows assigning the following actions to the middle mouse button: panning the diagram view, canceling the current drawing operation, or starting a multiple selection operation. ModifierKeyActions allows changing the function of keyboard modifier keys such as the ALT, CTRL and SHIFT keys.

Users actions can be validated by handling various events, fired while the diagram or zoom factor is changed, or a custom in-place editor control is created.

The following properties control what kind of links users can create: AllowLinksRepeat, AllowSelfLoops, AllowUnanchoredLinks, AllowUnconnectedLinks. The order in which items are hit-tested when clicking on them depends on the value of HitTestPriority.

 Inheritance Hierarchy

System.Object
    System.MarshalByRefObject
        System.ComponentModel.Component
            System.Windows.Forms.Control
                MindFusion.Common.WinForms.TouchControl
                    MindFusion.Diagramming.WinForms.DiagramView
                        MindFusion.Diagramming.WinForms.DiagramView3D
                        MindFusion.Diagramming.WinForms.TabbedDiagramView

 See Also