GTKSystem.Windows.Forms 1.0.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package GTKSystem.Windows.Forms --version 1.0.0.3
                    
NuGet\Install-Package GTKSystem.Windows.Forms -Version 1.0.0.3
                    
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="GTKSystem.Windows.Forms" Version="1.0.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GTKSystem.Windows.Forms" Version="1.0.0.3" />
                    
Directory.Packages.props
<PackageReference Include="GTKSystem.Windows.Forms" />
                    
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 GTKSystem.Windows.Forms --version 1.0.0.3
                    
#r "nuget: GTKSystem.Windows.Forms, 1.0.0.3"
                    
#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.
#addin nuget:?package=GTKSystem.Windows.Forms&version=1.0.0.3
                    
Install as a Cake Addin
#tool nuget:?package=GTKSystem.Windows.Forms&version=1.0.0.3
                    
Install as a Cake Tool

GTKSystem.Windows.Forms

介绍

Visual Studio原生开发,无需学习,一次编译,跨平台运行. C#桌面应用程序跨平台(windows、linux、macos)界面开发组件,基于GTK组件开发,该组件的核心优势是使用C#的原生winform表单控件窗体设计器,相同的属性方法,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)、GTKSystem.Windows.Forms
  3. 引用GTKSystem.Windows.Forms.dll
  4. 检查form表单是否有使用图像资源,如使用需新建System.Resources.ResourceManager和System.ComponentModel.ComponentResourceManager,具体请看下面内容。
  5. 按默认配置编译发布测试运行
  6. linux和macos上执行命令:dotnet doemo_app.dll

(注:如果出现打开visual studio的Form窗体设计器出现“设计器”相关异常,可自建一个空类,命名为System.Resources.Extensions.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.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on GTKSystem.Windows.Forms:

Package Downloads
Net4x.GtkWindowsFormsLibrary

Windows Library

Net4x.InputBoxLibrary.GtkWinForms

InputBoxLibrary WinForms

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.24.69 156 10 days ago
1.3.24.68 176 25 days ago
1.3.24.67 188 a month ago
1.3.24.66 298 2 months ago
1.3.24.65 149 3 months ago
1.3.24.64 326 4 months ago
1.3.24.63 196 4 months ago
1.3.24.62 319 4 months ago
1.3.24.61 117 4 months ago
1.3.24.60 174 5 months ago
1.3.24.59 138 5 months ago
1.3.24.58 370 6 months ago
1.3.24.57 168 6 months ago
1.3.24.56 185 7 months ago
1.3.24.55 149 7 months ago
1.3.24.54 302 8 months ago
1.3.24.53 161 8 months ago
1.3.24.52 160 8 months ago
1.3.24.51 118 9 months ago
1.3.24.50 159 9 months ago
1.3.24.49 151 9 months ago
1.3.24.48 143 10 months ago
1.3.24.47 231 8/27/2024
1.3.24.46 343 8/26/2024
1.3.24.45 311 7/16/2024
1.3.24.44 131 7/15/2024
1.3.24.43 138 7/12/2024
1.3.24.42 163 7/8/2024
1.3.24.41 216 7/7/2024
1.3.24.40 139 7/2/2024
1.3.24.39 163 6/27/2024
1.3.24.38 179 6/22/2024
1.3.24.37 130 6/22/2024
1.3.24.36 139 6/20/2024
1.3.24.35 130 6/20/2024
1.3.24.34 135 6/18/2024
1.3.24.33 133 6/11/2024
1.3.24.32 129 6/9/2024
1.3.24.31 153 5/30/2024
1.3.24.30 124 5/27/2024
1.3.24.29 131 5/22/2024
1.3.24.28 134 5/21/2024
1.3.24.27 121 5/20/2024
1.3.24.26 137 5/16/2024
1.3.24.25 117 5/16/2024
1.3.24.24 137 5/15/2024
1.3.24.23 144 5/10/2024
1.3.24.22 149 5/6/2024
1.3.24.21 131 5/6/2024
1.3.24.20 124 5/5/2024
1.3.24.14 165 4/20/2024
1.3.24.13 129 4/19/2024
1.3.24.12 152 3/28/2024
1.3.24.11 423 3/19/2024
1.3.24.10 141 3/6/2024
1.3.24.9 182 3/2/2024
1.3.24.8 128 2/29/2024
1.3.24.7 141 2/22/2024
1.3.24.6 175 2/20/2024
1.3.24.5 126 2/18/2024
1.3.24.4 138 2/8/2024
1.3.24.3 136 2/5/2024
1.3.24.2 137 2/5/2024
1.3.24.1 131 2/5/2024
1.0.0.3 136 2/8/2024
1.0.0.2 148 2/8/2024
1.0.0.1 190 2/5/2024

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