一、目的:分享一个自研的开源流程图控件
二、使用方法
1、引用Nuget包:
![](https://img-blog.csdnimg.cn/img_convert/8b5b36a8d272403bef5d691a2f5a4777.png)
2、添加节点列表和绘图控件
XML
<DockPanel>
<ItemsControl DockPanel.Dock="Left">
<h:GeometryNodeData Text="节点"/>
</ItemsControl>
<h:Diagram>
<h:Diagram.Layout>
<h:LocationLayout />
</h:Diagram.Layout>
<h:Diagram.LinkDrawer>
<h:BrokenLinkDrawer />
</h:Diagram.LinkDrawer>
<b:Interaction.Behaviors>
<h:DiagramDropTextNodeBehavior/>
</b:Interaction.Behaviors>
</h:Diagram>
</DockPanel>
3、运行效果
三、环境
VS2022 NET7
四、更多示例
GitHub - HeBianGu/WPF-Diagram: WPF流程图控件
exe示例下载地址:Release 1.0.0 · HeBianGu/WPF-Diagram · GitHub
![](https://img-blog.csdnimg.cn/img_convert/186cbf2bae7470ef067fd9c27205ff2e.png)
![](https://img-blog.csdnimg.cn/img_convert/c6f3f196d08d4494b11838eeb3722484.png)
![](https://img-blog.csdnimg.cn/img_convert/cb4bfdaeeda71c93bd43d02a228e85ad.png)
![](https://img-blog.csdnimg.cn/img_convert/2b9c116582b1c9a4a1c9f3f04d0e6f58.png)
五、教程
待更新
六、源码地址
GitHub - HeBianGu/WPF-ControlDemo: 示例
GitHub - HeBianGu/WPF-ControlBase: Wpf封装的自定义控件资源库
GitHub - HeBianGu/WPF-Control: WPF轻量控件和皮肤库