GTKSystem.Windows.Forms 1.0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global GTKSystem.Windows.Forms --version 1.0.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local GTKSystem.Windows.Forms --version 1.0.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=GTKSystem.Windows.Forms&version=1.0.0.1
                    
nuke :add-package GTKSystem.Windows.Forms --version 1.0.0.1
                    

GTKSystem.Windows.Forms

介绍

Visual Studio原生开发,无需学习,一次编译,跨平台运行. 这是基于GTK框架组件开发的跨平台(windows、linux、macos)C#桌面应用程序表单界面组件,该组件的核心优势是使用C#的原生表单控件和属性方法,C#原生开发即可,无需学习。 便于开发跨平台winform软件,便于将C#升级为跨平台软件。

作者博客请看 https://www.cnblogs.com/easywebfactory/p/17803567.html

目前功能持续更新中,将优先完善常用功能。

软件架构

使用GTK3.24.24.95作为表单UI重写C#的System.Windows.Forms组件,在应用时,兼容原生C#程序组件。

安装教程
  1. 把项目工程改为“控制台应用程序”或者配置UseWindowsForms为false,框架.net6或以上版本
  2. NulGet安装GtkSharp(3.24.24.95)
  3. 引用Libs目录下的GTKSystem.Windows.Forms.dll和System.Resources.Extensions.dll
  4. 编译发布测试运行
  5. linux和macos上执行命令:dotnet doemo_app.dll
VisualStudio插件安装

关闭visual studio,直接双击GTKWinformVSIXProject.vsix文件安装

插件会安装两个功能,都是在右键菜单和工具菜单上添加:

1、新建项的Form窗体模板

2、菜单增加设置/修复窗体设计器

输入图片说明

使用说明

以下配置在你的项目工程里操作:

1、新建System.Resources.ResourceManager类<br/> 在项目下新建System.Resources.ResourceManager类,继承GTKSystem.Resources.ResourceManager,用于覆盖原生System.Resources.ResourceManager类。 GTKSystem.Resources.ResourceManager实现了项目资源文件和图像文件读取。 如果项目里没有使用资源图像文件,可以不用新建此文件。

2、新建System.ComponentModel.ComponentResourceManager类<br/> 在项目下新建System.ComponentModel.ComponentResourceManager类,继承GTKSystem.ComponentModel.ComponentResourceManager,用于覆盖原生System.ComponentModel.ComponentResourceManager类。<br/> GTKSystem.ComponentModel.ComponentResourceManager实现了项目资源文件和图像文件读取(调用GTKSystem.Resources.ResourceManager)。 如果项目里没有使用资源图像文件,可以不用新建此文件。

3、GTKWinFormsApp.csproj<br/> 配置UseWindowsForms为false,或者使用控制台应用程序

<UseWindowsForms>false</UseWindowsForms>

4、引用GTKSystem.Windows.Forms、System.Resources.Extensions <br/> System.Resources.Extensions是空程序dll,VS加载Form界面时验证需要此dll.

5、GTKWinFormsApp\obj\Debug\net6.0\GTKWinFormsApp.designer.runtimeconfig.json GTKWinFormsApp\obj\Release\net6.0\GTKWinFormsApp.designer.runtimeconfig.json 将name设置为Microsoft.WindowsDesktop.App, 用于VS支持可视化窗体设计器,重新加载工程或重启VS

   "runtimeOptions": {
     "framework": {
      "name": "Microsoft.WindowsDesktop.App"
    },

demo效果

输入图片说明

mac运行效果

输入图片说明

颜色主题

输入图片说明

窗口背景

输入图片说明

工具栏菜单

输入图片说明

交流

QQ群:236066073

参与贡献
  1. https://gitee.com/easywebfactory
  2. https://github.com/easywebfactory
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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.

This package has no dependencies.

Version Downloads Last Updated
1.3.24.75 125 8/29/2025
1.3.24.74 141 8/15/2025
1.3.24.73 139 8/14/2025
1.3.24.72 380 7/25/2025
1.3.24.71 446 7/24/2025
1.3.24.70 384 7/21/2025
1.3.24.69 212 6/29/2025
1.3.24.68 190 6/14/2025
1.3.24.67 197 5/26/2025
1.3.24.66 357 5/5/2025
1.3.24.65 157 4/19/2025
1.3.24.64 340 3/10/2025
1.3.24.63 205 3/9/2025
1.3.24.62 352 2/27/2025
1.3.24.61 125 2/26/2025
1.3.24.60 186 2/10/2025
1.3.24.59 149 2/5/2025
1.3.24.58 381 1/2/2025
1.3.24.57 178 12/28/2024
1.3.24.56 194 12/13/2024
1.3.24.55 157 11/26/2024
1.3.24.54 311 11/14/2024
1.3.24.53 169 11/6/2024
1.3.24.52 169 10/24/2024
1.3.24.51 126 10/23/2024
1.3.24.50 168 10/19/2024
1.3.24.49 160 9/27/2024
1.3.24.48 151 9/22/2024
1.3.24.47 238 8/27/2024
1.3.24.46 352 8/26/2024
1.3.24.45 320 7/16/2024
1.3.24.44 142 7/15/2024
1.3.24.43 146 7/12/2024
1.3.24.42 170 7/8/2024
1.3.24.41 224 7/7/2024
1.3.24.40 146 7/2/2024
1.3.24.39 172 6/27/2024
1.3.24.38 187 6/22/2024
1.3.24.37 137 6/22/2024
1.3.24.36 146 6/20/2024
1.3.24.35 141 6/20/2024
1.3.24.34 145 6/18/2024
1.3.24.33 140 6/11/2024
1.3.24.32 142 6/9/2024
1.3.24.31 161 5/30/2024
1.3.24.30 133 5/27/2024
1.3.24.29 140 5/22/2024
1.3.24.28 141 5/21/2024
1.3.24.27 130 5/20/2024
1.3.24.26 148 5/16/2024
1.3.24.25 127 5/16/2024
1.3.24.24 145 5/15/2024
1.3.24.23 151 5/10/2024
1.3.24.22 158 5/6/2024
1.3.24.21 139 5/6/2024
1.3.24.20 131 5/5/2024
1.3.24.14 174 4/20/2024
1.3.24.13 136 4/19/2024
1.3.24.12 160 3/28/2024
1.3.24.11 447 3/19/2024
1.3.24.10 148 3/6/2024
1.3.24.9 192 3/2/2024
1.3.24.8 134 2/29/2024
1.3.24.7 147 2/22/2024
1.3.24.6 182 2/20/2024
1.3.24.5 133 2/18/2024
1.3.24.4 145 2/8/2024
1.3.24.3 144 2/5/2024
1.3.24.2 144 2/5/2024
1.3.24.1 139 2/5/2024
1.0.0.3 145 2/8/2024
1.0.0.2 156 2/8/2024
1.0.0.1 201 2/5/2024

C#界面跨平台开发组件gtksystem-windows-forms