C1.WPF.FlexDiagramC1.Diagram.Parser (for MermaidJS support)MainWindow.xaml and add:
| xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" |
| <c1:FlexDiagram x:Name="diagram"/> |
| C# |
コードのコピー
|
|---|---|
using C1.WPF.Diagram; using System.Windows; public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); Loaded += (s, e) => InitDiagram(); } private void InitDiagram() { var n1 = new Node() { Text = "Start" }; var n2 = new Node() { Text = "End" }; diagram.Nodes.Add(n1); diagram.Nodes.Add(n2); diagram.Edges.Add(new Edge() { Source = n1, Target = n2 }); } } |
|