Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagramming for Blazor, V1.0 (Read 198 times)
Forum Admin
YaBB Administrator
*****
Offline


Rock and Roll

Posts: 689
Joined: Apr 6th, 2003
Diagramming for Blazor, V1.0
Apr 29th, 2024 at 10:20am
Print Post  
MindFusion.Diagramming is now available for .NET Blazor. The first release includes most of the features from MindFusion.Diagramming desktop controls, including link routers and graph layout algorithms. The following list outlines the differences.

  • The System.Drawing namespace is not available for Blazor WebAssembly. The RectangleF, PointF, SizeF and Color properties from the diagramming API have been changed to respective Rect, Point, Size and Color from Microsoft.Maui.Graphics namespace.
  • Available node classes include ShapeNode, ContainerNode, TableNode, TreeViewNode, FreeFormNode, CompositeNode. Missing types are ControlNode, BarcodeNode, MapNode and VisioNode. These will be added upon request.
  • Available export classes include VisioExporter, SvgExporter, PdfExporter, DxfExporter, ExcelExporter. Missing ones are WmfExporter (Windows Metafile format) and SwfExporter (Adobe Flash format).
  • Available UI controls include NodeListView and ContextMenu. Missing controls are TabbedDiagramView, Overview, Ruler, ZoomControl, which will be implemented in next releases.

The nuget package is located at:

https://www.nuget.org/packages/MindFusion.Diagramming.Blazor/

Distribution including sample projects and help files is available here:

https://mindfusion.eu/BlazorDiagram.zip

Basic initialization looks like this:

Code
Select All
@using MindFusion.Diagramming;
@using MindFusion.Diagramming.Blazor;

<DiagramView @ref="diagramView" />

DiagramView diagramView;
Diagram diagram;

@code {
protected override void OnAfterRender(bool firstRender)
{
    base.OnAfterRender(firstRender);

    if (firstRender)
    {
        diagram = diagramView.Diagram;
        diagram.Bounds = new Microsoft.Maui.Graphics.Rect(0, 0, 2000, 2000);
        diagram.NodeCreated += OnNodeCreated;
        .....
    }
} 



Enjoy!
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint