SuncodeSoftware.SuperSDK.Canvas 2.3.0

dotnet add package SuncodeSoftware.SuperSDK.Canvas --version 2.3.0
                    
NuGet\Install-Package SuncodeSoftware.SuperSDK.Canvas -Version 2.3.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="SuncodeSoftware.SuperSDK.Canvas" Version="2.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SuncodeSoftware.SuperSDK.Canvas" Version="2.3.0" />
                    
Directory.Packages.props
<PackageReference Include="SuncodeSoftware.SuperSDK.Canvas" />
                    
Project file
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 SuncodeSoftware.SuperSDK.Canvas --version 2.3.0
                    
#r "nuget: SuncodeSoftware.SuperSDK.Canvas, 2.3.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 SuncodeSoftware.SuperSDK.Canvas@2.3.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=SuncodeSoftware.SuperSDK.Canvas&version=2.3.0
                    
Install as a Cake Addin
#tool nuget:?package=SuncodeSoftware.SuperSDK.Canvas&version=2.3.0
                    
Install as a Cake Tool

SuperSDK.Canvas

Avalonia 画布组件库,提供可视化绘图、设备管理、连线等功能。

安装

dotnet add package SuperSDK.Canvas

使用示例

1. 在 XAML 中使用画布

<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:canvas="using:SuperSDK.Canvas.Views">
    
    <canvas:GzCanvasView DataContext="{Binding Canvas}" />
    
</UserControl>

2. 在 ViewModel 中创建画布

using SuperSDK.Canvas.ViewModels;
using SuperSDK.Canvas.Services;

public class MainViewModel : ViewModelBase
{
    public GzCanvasViewModel Canvas { get; }
    
    public MainViewModel()
    {
        Canvas = new GzCanvasViewModel();
        
        // 加载画布数据(如果存在)
        string filePath = "canvas_data.gvs";
        if (File.Exists(filePath))
        {
            Canvas = CanvasFileService.LoadCanvas(filePath);
        }
    }
    
    public void SaveCanvas()
    {
        CanvasFileService.SaveCanvas(Canvas, "canvas_data.gvs");
    }
}

3. 常用操作

// 添加设备
Canvas.AddDevice(deviceModel);

// 删除设备
Canvas.RemoveDevice(deviceId);

// 清空画布
Canvas.ClearCanvas();

// 保存/加载数据(使用 CanvasFileService)
using SuperSDK.Canvas.Services;

CanvasFileService.SaveCanvas(Canvas, filePath);
var loadedCanvas = CanvasFileService.LoadCanvas(filePath);
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.3.0 0 1/16/2026
2.2.0 0 1/16/2026
2.1.0 0 1/16/2026
2.0.8 0 1/15/2026
2.0.7 0 1/15/2026
2.0.6 4 1/15/2026
2.0.5 5 1/15/2026
2.0.4 4 1/15/2026
2.0.3 11 1/15/2026
2.0.2 22 1/15/2026
2.0.1 23 1/15/2026
2.0.0 23 1/15/2026
1.2.6 172 12/23/2025
1.2.5 168 12/23/2025
1.2.4 168 12/23/2025
1.2.2 168 12/23/2025
1.2.1 168 12/22/2025
1.2.0 161 12/22/2025
1.1.8 163 12/22/2025
1.1.7 168 12/22/2025
1.1.6 167 12/22/2025
1.1.5 168 12/22/2025
1.1.4 166 12/22/2025
1.1.3 161 12/22/2025
1.1.2 164 12/22/2025
1.1.1 167 12/22/2025

update readme