menu

WinForms

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

    Show / Hide Table of Contents

    Class GraphLayoutManager

    The GraphLayoutManager defines the base class used for implementing layout managers for diagrams composed of nodes that form a connected graph. The GraphLayoutManager provides the necessary foundation for initializing, validating and creating the diagram graph. The GraphLayoutManager also implements the infrastructure for positioning diagram nodes using the specialized layout strategies provided by custom layout managers. LayoutManager DirectedTreeLayoutManager RadialTreeLayoutManager

    Inheritance
    System.Object
    LayoutManager
    GraphLayoutManager
    DirectedTreeLayoutManager
    HierarchicLayoutManager
    SymmetricLayoutManager
    Inherited Members
    LayoutManager.AutoLayout
    LayoutManager.autoLayoutFlag
    LayoutManager.LayoutUpdated
    LayoutManager.LeftMargin
    LayoutManager.mdl
    LayoutManager.Model
    LayoutManager.Nodes
    LayoutManager.OnConnectionsChanged(CollectionExEventArgs)
    LayoutManager.OnLayoutUpdated(EventArgs)
    LayoutManager.OnNodeCollectionChanged(CollectionExEventArgs)
    LayoutManager.OnPropertyChanged(PropertyChangedEventArgs)
    LayoutManager.TopMargin
    LayoutManager.UpdatingLayout
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Base.dll
    Syntax
    public abstract class GraphLayoutManager : LayoutManager

    Constructors

    GraphLayoutManager()

    Initializes a new instance of the GraphLayoutManager class.

    Declaration
    public GraphLayoutManager()

    GraphLayoutManager(Model, Single, Single)

    Initializes a new instance of the GraphLayoutManager class.

    Declaration
    public GraphLayoutManager(Model model, float fHorizontalSpacing, float fVerticalSpacing)
    Parameters
    Type Name Description
    Model model

    The diagram Model.

    System.Single fHorizontalSpacing

    The horizontal spacing between nodes.

    System.Single fVerticalSpacing

    The vertical spacing between nodes.

    Fields

    m_fXBorder

    Declaration
    protected float m_fXBorder
    Field Value
    Type
    System.Single

    m_fYBorder

    Declaration
    protected float m_fYBorder
    Field Value
    Type
    System.Single

    m_fYHighest

    Declaration
    protected float m_fYHighest
    Field Value
    Type
    System.Single

    Properties

    HorizontalSpacing

    Gets or sets the horizontal offset between adjacent nodes.

    Declaration
    public float HorizontalSpacing { get; set; }
    Property Value
    Type
    System.Single

    ImprovePerformance

    Gets or sets a value indicating whether performance can be improved.

    Declaration
    public bool ImprovePerformance { get; set; }
    Property Value
    Type
    System.Boolean

    PassedNodes

    Gets or sets the passed node collection where key is node fullname and value - node reference.

    Declaration
    protected Hashtable PassedNodes { get; set; }
    Property Value
    Type Description
    System.Collections.Hashtable

    The passed nodes.

    SelectedNode

    Gets or sets the current selected node while generation node graph.

    Declaration
    protected object SelectedNode { get; set; }
    Property Value
    Type Description
    System.Object

    The selected node.

    VerticalSpacing

    Gets or sets the vertical offset between adjacent nodes.

    Declaration
    public float VerticalSpacing { get; set; }
    Property Value
    Type
    System.Single

    Methods

    DoGraphLayout()

    Applies a custom layout management strategy on the diagram.

    Declaration
    protected abstract void DoGraphLayout()

    OnPreferredLayout(PreferredLayoutEventArgs)

    Occurs before a node(or graph) is positioned.

    Declaration
    protected virtual void OnPreferredLayout(PreferredLayoutEventArgs evtargs)
    Parameters
    Type Name Description
    PreferredLayoutEventArgs evtargs

    Event arguments.

    Remarks

    This method can be overridden in derived classes.

    PreferredLayoutEventArgs

    UpdateLayout(NodeCollection)

    Updates the layout of the given nodes.

    Declaration
    protected bool UpdateLayout(NodeCollection nodesToLayout)
    Parameters
    Type Name Description
    NodeCollection nodesToLayout

    The nodes to layout.

    Returns
    Type Description
    System.Boolean

    True if changes were made; otherwise False.

    UpdateLayout(Object)

    Updates the layout of the nodes in the model.

    Declaration
    public override bool UpdateLayout(object contextInfo)
    Parameters
    Type Name Description
    System.Object contextInfo

    Provides context information to help with updating the layout.

    Returns
    Type Description
    System.Boolean

    True if changes were made; otherwise False.

    Overrides
    LayoutManager.UpdateLayout(Object)

    Events

    PreferredLayout

    Occurs before a node graph is positioned.

    Declaration
    public event PreferredLayoutEventHandler PreferredLayout
    Event Type
    Type
    PreferredLayoutEventHandler
    Remarks

    Handling the PreferredLayout event provides users with the ability to examine the bounds used for laying out the node graph and specify a different bounds if necessary.

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