menu

WinForms

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

    Show / Hide Table of Contents

    Class DocumentExplorer

    This control is used to list all the nodes added the diagram model in a tree fashion. Its in-built contextmenu provides options to hide, rename, delete a node from the collection. It also provides support to add layers and delete or rename a layer through its context menu.

    Inheritance
    System.Object
    DocumentExplorer
    Namespace: Syncfusion.Windows.Forms.Diagram.Controls
    Assembly: Syncfusion.Diagram.Windows.dll
    Syntax
    public class DocumentExplorer : TreeView

    Constructors

    DocumentExplorer()

    Initializes a new instance of the DocumentExplorer class.

    Declaration
    public DocumentExplorer()

    Fields

    c_strLAYER_COLLECTION

    Declaration
    protected const string c_strLAYER_COLLECTION = "LayerCollection"
    Field Value
    Type
    System.String

    c_strLAYERS

    Declaration
    protected const string c_strLAYERS = "Layers"
    Field Value
    Type
    System.String

    c_strNODE_COLLECTION

    Declaration
    protected const string c_strNODE_COLLECTION = "NodeCollection"
    Field Value
    Type
    System.String

    c_strNODES

    Declaration
    protected const string c_strNODES = "Nodes"
    Field Value
    Type
    System.String

    Methods

    AddModel(Model)

    Reflects given model's hierarchy in TreeView

    Declaration
    protected bool AddModel(Model model)
    Parameters
    Type Name Description
    Model model

    model to reflect hierarchy of

    Returns
    Type Description
    System.Boolean

    true - model successfully added false - adding model failed

    AddToModelsArray(Model)

    Adds to models array.

    Declaration
    protected void AddToModelsArray(Model model)
    Parameters
    Type Name Description
    Model model

    The model.

    AttachModel(Model)

    Adds Model to DocumentExplorer

    Declaration
    public bool AttachModel(Model model)
    Parameters
    Type Name Description
    Model model

    Model to add

    Returns
    Type Description
    System.Boolean

    true - model successfully added false - adding model to document explorer failed

    DetachModel(Model)

    Removes Model from DocumentExplorerr

    Declaration
    public bool DetachModel(Model model)
    Parameters
    Type Name Description
    Model model

    Model to remove

    Returns
    Type Description
    System.Boolean

    true - model successfully removed false - removing model to document explorer failed

    FindModelCorrespondingTreeNode(Model)

    Looks for given model's corresponding TreeNode.

    Declaration
    protected TreeNode FindModelCorrespondingTreeNode(Model model)
    Parameters
    Type Name Description
    Model model

    model to look for corresponding treenode

    Returns
    Type Description
    System.Windows.Forms.TreeNode

    Null - if match not found, otherwise - match tree node

    FindTreeNode(Model, DocumentExplorer.TreeNodeType, INode)

    Searches for TreeNode corresponding model node.

    Declaration
    protected TreeNode FindTreeNode(Model model, DocumentExplorer.TreeNodeType nodeType, INode node)
    Parameters
    Type Name Description
    Model model

    The model.

    DocumentExplorer.TreeNodeType nodeType

    Type of the node.

    INode node

    The node.

    Returns
    Type Description
    System.Windows.Forms.TreeNode

    The node found

    FindTreeNode(TreeNode, DocumentExplorer.TreeNodeType, Object)

    Finds the tree node.

    Declaration
    protected TreeNode FindTreeNode(TreeNode nodeModel, DocumentExplorer.TreeNodeType nodeType, object searchSubject)
    Parameters
    Type Name Description
    System.Windows.Forms.TreeNode nodeModel

    The node model.

    DocumentExplorer.TreeNodeType nodeType

    Type of the node.

    System.Object searchSubject

    The search subject.

    Returns
    Type Description
    System.Windows.Forms.TreeNode

    The node found.

    FindTreeNode(TreeNode, Object)

    Finds the tree node.

    Declaration
    protected TreeNode FindTreeNode(TreeNode nodeSubRoot, object searchSubject)
    Parameters
    Type Name Description
    System.Windows.Forms.TreeNode nodeSubRoot

    The node sub root.

    System.Object searchSubject

    The search subject.

    Returns
    Type Description
    System.Windows.Forms.TreeNode

    The node found.

    OnAfterLabelEdit(NodeLabelEditEventArgs)

    Raises the System.Windows.Forms.TreeView.AfterLabelEdit event.

    Declaration
    protected override void OnAfterLabelEdit(NodeLabelEditEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.NodeLabelEditEventArgs e

    A System.Windows.Forms.NodeLabelEditEventArgs that contains the event data.

    OnMouseDown(MouseEventArgs)

    Raises the System.Windows.Forms.Control.MouseDown event.

    Declaration
    protected override void OnMouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    A System.Windows.Forms.MouseEventArgs that contains the event data.

    ParseChildren(Model, TreeNode)

    Parses model's node collection

    Declaration
    protected void ParseChildren(Model model, TreeNode nodeModel)
    Parameters
    Type Name Description
    Model model

    model to parse node collection of

    System.Windows.Forms.TreeNode nodeModel

    TreeNode to add node collection corresponding TreeNodes into

    ParseChildren(NodeCollection, TreeNode)

    Parses the children.

    Declaration
    protected void ParseChildren(NodeCollection nodes, TreeNode nodesParent)
    Parameters
    Type Name Description
    NodeCollection nodes

    The nodes.

    System.Windows.Forms.TreeNode nodesParent

    The nodes parent.

    ParseChildren(ICollection, TreeNode)

    Parses the children.

    Declaration
    protected void ParseChildren(ICollection nodes, TreeNode nodesParent)
    Parameters
    Type Name Description
    System.Collections.ICollection nodes

    The nodes.

    System.Windows.Forms.TreeNode nodesParent

    The nodes parent.

    ParseLayer(Layer, TreeNode)

    Parses the layer.

    Declaration
    protected void ParseLayer(Layer layer, TreeNode nodeLayersParent)
    Parameters
    Type Name Description
    Layer layer

    The layer.

    System.Windows.Forms.TreeNode nodeLayersParent

    The node layers parent.

    ParseLayers(LayerCollection, TreeNode)

    Parses the layers.

    Declaration
    protected void ParseLayers(LayerCollection layers, TreeNode nodeLayersParent)
    Parameters
    Type Name Description
    LayerCollection layers

    The layers.

    System.Windows.Forms.TreeNode nodeLayersParent

    The node layers parent.

    ParseLayers(Model, TreeNode)

    Parses the layers.

    Declaration
    protected void ParseLayers(Model model, TreeNode nodeModel)
    Parameters
    Type Name Description
    Model model

    The model.

    System.Windows.Forms.TreeNode nodeModel

    The node model.

    ParseLayers(ICollection, TreeNode)

    Parses the layers.

    Declaration
    protected void ParseLayers(ICollection layers, TreeNode nodeLayersParent)
    Parameters
    Type Name Description
    System.Collections.ICollection layers

    The layers.

    System.Windows.Forms.TreeNode nodeLayersParent

    The node layers parent.

    ParseModel(Model, TreeNode)

    Parses model representation

    Declaration
    protected void ParseModel(Model model, TreeNode nodeModel)
    Parameters
    Type Name Description
    Model model

    model to parse

    System.Windows.Forms.TreeNode nodeModel

    TreeNode representing model ( root node for adding model )

    SubscribeForModelEvents(Model)

    Subscribes for model events.

    Declaration
    protected void SubscribeForModelEvents(Model model)
    Parameters
    Type Name Description
    Model model

    The model.

    UnSubscribeForModelEvents(Model)

    Unsubscribe for model events.

    Declaration
    protected void UnSubscribeForModelEvents(Model model)
    Parameters
    Type Name Description
    Model model

    The model.

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