NodeStudio.Controls
0.4.0
dotnet add package NodeStudio.Controls --version 0.4.0
NuGet\Install-Package NodeStudio.Controls -Version 0.4.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NodeStudio.Controls" Version="0.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NodeStudio.Controls" Version="0.4.0" />
<PackageReference Include="NodeStudio.Controls" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NodeStudio.Controls --version 0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NodeStudio.Controls, 0.4.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NodeStudio.Controls@0.4.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NodeStudio.Controls&version=0.4.0
#tool nuget:?package=NodeStudio.Controls&version=0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NodeStudio.Controls
NodeStudio 节点图编辑器控件库(WPF,.NET 8)——画布、工具箱、属性面板与深色主题
基于 Nodify 的完整节点编辑器界面控件,配合核心库 NodeStudio 使用:提供节点画布(拖拽/连线/框选/多选删除/复制粘贴)、工具箱(分类拖放)、右侧属性面板(节点操作控件)、块内部子图编辑器、深色样式库与统一弹窗/菜单。
功能
- 节点画布:拖拽创建、拉线连接、选中节点相关连线高亮(#ffa500)、多选/框选、复制粘贴(含块内部节点与连线)、重命名、删除
- 运行控制:全局运行/暂停/连续运行;运行中画布只读保护;左下角显示图运行结果(外层/块内部按层级切换,耗时保留 3 位小数)
- 块内部编辑器:双击节点块进入子图,面包屑导航返回;循环参数编辑;块输入/块输出虚拟节点右键增删/重命名端口(类型可选,含自定义类型)
- 属性面板:选中节点显示其操作控件(
NodeBaseControl子类,XAML 自定义);内置条件/计算/延时/信号节点均带深色操作界面 - 跨块/跨图同步:发送信号/等待信号节点 + 全局信号存储——并行块中途汇合、多图共享状态;等待信号信号名下拉候选自动包含所有层级发送节点
- 深色风格:统一深色主题(编辑器/弹窗/右键菜单/下拉/输入框/按钮/复选框),
Styles.xaml可复用样式库 - 序列化接入:文件菜单导出/导入 JSON 图(经核心库
GraphSerializer)
快速开始
dotnet add package NodeStudio.Controls
项目需 net8.0-windows(或更高 windows TFM)并启用 WPF:
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
</PropertyGroup>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/NodeStudio.Controls;component/Views/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
// 编辑器 ViewModel + 节点块
var editor = new EditorViewModel();
var block = new NodeBlockViewModel("计算块");
block.AddInput<int>("数值A").AddOutput<int>("结果");
editor.AddNode(block);
自定义节点界面
节点被选中时在右侧属性面板显示的操作控件,继承 NodeBaseControl 并用 XAML 搭建:
<ctrl:NodeBaseControl x:Class="MyApp.MyNodeControl"
xmlns:ctrl="clr-namespace:NodeStudio.Controls.Views;assembly=NodeStudio.Controls">
<TextBox Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource DialogTextBoxStyle}"/>
</ctrl:NodeBaseControl>
public class MyNodeControl : NodeBaseControl
{
public MyNodeControl(MyNodeViewModel vm) : base(vm) => InitializeComponent();
}
// ViewModel 中:
public override Control GetControl() => new MyNodeControl(this);
注册自定义 ViewModel 工厂,导入图时恢复操作控件:
NodeViewModelFactory.RegisterVmFactory<MyNode>(node => new MyNodeViewModel((MyNode)node));
依赖
- NodeStudio (>= 0.3.0)
- Nodify 7.3.0
- CommunityToolkit.Mvvm 8.4.2
- Microsoft.Xaml.Behaviors.Wpf 1.1.142
许可证
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0-windows7.0
- CommunityToolkit.Mvvm (>= 8.4.2)
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.142)
- NodeStudio (>= 0.4.0)
- Nodify (>= 7.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.