Search
TabbedDiagramView Class
Remarks See Also
 





Represents a DiagramView that can display DiagramDocument objects. The individual diagram pages can be activated through the tabs in the tray located at one of the view sides.

Namespace: MindFusion.Diagramming.Mvc
Assembly: MindFusion.Diagramming.Mvc

 Syntax

C#  Copy Code

public class TabbedDiagramView : DiagramView

Visual Basic  Copy Code

Public Class TabbedDiagramView
    Inherits DiagramView

 Remarks

Use the TabbedDiagramView html helper to add this control to a page:

Index.cshtml  Copy Code

@Html.TabbedDiagramView(
    (TabbedDiagramView)ViewBag.DiagramView,
    new { style = "width:100%;height:100%;" })

Setting up the view from code-behind looks like this:

Controller.cs  Copy Code

public IActionResult Index()
{
    TabbedDiagramView view = TabbedDiagramView.FromRequest("diagramView", Request);
    ViewBag.DiagramView = view;

    if (!Request.HasFormContentType)
    {
        view.TabAlignment = TabAlignment.Top;

        var doc = view.Document;

        var p1 = new DiagramPage();
        p1.Title = "diagram1";
        p1.TitleColor = Color.Red;
        var node = p1.Factory.CreateShapeNode(10, 10, 20, 20);
        doc.Pages.Add(p1);
    }

    return View();
}

 Inheritance Hierarchy

System.Object
    MindFusion.Diagramming.Mvc.DiagramView
        MindFusion.Diagramming.Mvc.TabbedDiagramView

 See Also