After following the previous topic, you should be able to use MindFusion.Diagramming classes in your project.
Call the UseMindFusionDiagramming extension from CreateMauiApp to configure the library:
C# Copy Code |
---|
namespace DiagramMauiApp; |
Xaml Copy Code |
---|
<?xml version="1.0" encoding="utf-8" ?> |
You can create nodes and links programmatically either by calling Factory methods, or by instantiating objects of respective class and adding them to Items collection:
C# Copy Code |
---|
public MainPage() |
Set the value of the Behavior property, which defines how the control interprets touch or mouse input. The default value LinkShapes specifies that users can draw shape nodes and connect them with links. Other Link* and Draw* modes allow drawing different types of nodes (TableNode, ContainerNode, etc). Modes such as Modify, PanAndModify, MoveNodes, SelectOnly allow users to interact with existing items, but not draw new ones on the canvas.
Browse the other sections of this help file to learn more about the functionality provided by the MindFusion.Diagramming classes, methods and properties. Follow the tutorials to learn how to populate the diagram model programmatically.