menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DiagramDocument - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DiagramDocument

    The DiagramDocument class implements a serializable document type that encapsulates the model and view data for the diagram.

    Inheritance
    System.Object
    DiagramDocument
    Implements
    System.Runtime.Serialization.ISerializable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Base.dll
    Syntax
    public class DiagramDocument : ISerializable
    Remarks

    This document class is used by the Essential Diagram DiagramControl and DiagramWebControl controls for persisting their state information. Model View ViewInfo

    Constructors

    DiagramDocument(Model, View)

    Initializes a new instance of the DiagramDocument class.

    Declaration
    public DiagramDocument(Model dgmModel, View dgmView)
    Parameters
    Type Name Description
    Model dgmModel

    The diagram model.

    View dgmView

    The diagram view.

    Remarks

    This method is retained only for backward compatibility and should not be used.

    DiagramDocument(Model, ViewInfo)

    Initializes a new instance of the DiagramDocument class.

    Declaration
    public DiagramDocument(Model dgmModel, ViewInfo dgmViewInfo)
    Parameters
    Type Name Description
    Model dgmModel

    The diagram model.

    ViewInfo dgmViewInfo

    The diagram ViewInfo.

    DiagramDocument(SerializationInfo, StreamingContext)

    Initializes a new instance of the DiagramDocument class.

    Declaration
    protected DiagramDocument(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    The info.

    System.Runtime.Serialization.StreamingContext context

    The context.

    Fields

    dgmModel

    The model.

    Declaration
    protected Model dgmModel
    Field Value
    Type
    Model

    dgmView

    The view.

    Declaration
    protected View dgmView
    Field Value
    Type
    View

    dgmViewInfo

    The view info.

    Declaration
    protected ViewInfo dgmViewInfo
    Field Value
    Type
    ViewInfo

    m_dgmModelComponent

    The diagram model.

    Declaration
    protected Model m_dgmModelComponent
    Field Value
    Type
    Model

    Properties

    DiagramProperties

    Get/set the Diagram Properties values

    Declaration
    public DiagramProperties DiagramProperties { get; }
    Property Value
    Type
    DiagramProperties

    Model

    Gets the diagram model.

    Declaration
    public Model Model { get; }
    Property Value
    Type
    Model

    ModelComponent

    Gets or sets the reference to the existing component in designer.

    Declaration
    public Model ModelComponent { get; set; }
    Property Value
    Type
    Model

    View

    Gets the diagram view.

    Declaration
    public View View { get; }
    Property Value
    Type
    View

    ViewInfo

    Gets the ViewInfo.

    Declaration
    public ViewInfo ViewInfo { get; }
    Property Value
    Type
    ViewInfo

    Explicit Interface Implementations

    ISerializable.GetObjectData(SerializationInfo, StreamingContext)

    Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.

    Declaration
    void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    The System.Runtime.Serialization.SerializationInfo to populate with data.

    System.Runtime.Serialization.StreamingContext context

    The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

    Exceptions
    Type Condition
    System.Security.SecurityException

    The caller does not have the required permission.

    Implements

    System.Runtime.Serialization.ISerializable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved