-
README
-
Frameworks
-
Dependencies
-
Used By
-
Versions
-
Release Notes
A .Net Core implementation of the Mono System.Windows.Forms library. This is built on top of System.Drawing.Common.
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. |
-
net6.0
-
Accessibility
(>= 4.6.0-preview3-27504-2) -
Core.Mono.WebBrowser
(>= 1.0.0-alpha6) -
Core.System.Drawing.Design
(>= 1.0.0-alpha6) -
Microsoft.Win32.Registry
(>= 4.7.0) -
Mono.Posix.NETStandard
(>= 1.0.0) -
System.Configuration.ConfigurationManager
(>= 6.0.0) -
System.Drawing.Common
(>= 6.0.0) -
System.Resources.Extensions
(>= 6.0.0) -
System.Security.Permissions
(>= 6.0.0)
-
Accessibility
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Core.System.Windows.Forms:
Package | Downloads |
---|---|
Core.System.Windows.Forms.DataVisualization A .Net Core implementation of the Mono System.Windows.Forms.DataVisualization library. This is built on top of System.Drawing.Common. |
576 |
RoundedShape2 Package Description |
294 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial Release
NuGet
.NET CLI
Paket CLIR
Direct Download
Install-Package System.Windows.Forms
dotnet add package System.Windows.Forms
paket add System.Windows.Forms
System.Windows.Forms Download (Unzip the "nupkg" after downloading)
COM->System.Windows.Forms
это не COM
.net Core, Visual Studio 2019, создаю проект в консоли(так ведь можно)
можно, но только когда вы знаете что делать дальше. а сейчас очевидно что не знаете:
— в .net Core формы поддерживатся с версии самой корки 3.*
— .net Core 3.* поддерживается начиная с Visual Studio 2019 (и то начиная со свежих билдов, осенних)
— визуального редактора форм на данный момент не существует
— есть руководство https://docs.microsoft.com/ru-ru/dotnet/core/porti… (что подключать там тоже написано)
совет — если вы только начинаете изучать программирование, не готовы осваивать XAML и нуждаете в визуальном редакторе форм, практикуйтесь сначала в .Net Framework, и используйте шаблон проекта WinForms
microsoft visual studio 2022
Проект Библиотека классов .NET 7
пкм по проекту (или зависимости) выбираем: Добавить => Ссылка на проект => Кликаем обзор =>
Отрывается окно => Переходим по структуре файлов вверх до папки «2022» =>
В поле поиска вставляем «System.Windows.Forms» => В результате ищем нужное (Примерно 3 снизу) =>
Выбираем => Тыкаем Добавить.
В свойствах проекта добавляем поддержку Windows Worms (если WPF).
Готово!
C:\Program Files\Microsoft Visual Studio\2022\Community\dotnet\runtime\shared\Microsoft.WindowsDesktop.App\6.0.14\System.Windows.Forms.dll
Вам нужно добавить ссылку на зависимость в свойствах проекта в обозревателе решений. Конечно, если проект не выполняется на .NET Core, в таком случае вам нужно подключить соответсвующее расширение с помощбю менеджера пакетов Nuget для проекта
System.Windows.Forms for .Net Core running on Windows and Linux
This is a early stage and experimental port of Mono’s System.Windows.Forms and a few additional libraries to .Net 6.0+. This allows Winforms code to run on both Windows and Linux (and possibly MacOS in the future).
Rather then porting Mono’s implementation of System.Drawing to .Net 6.0 I ported Mono’s System.Windows.Forms onto System.Drawing.Common. Note that on Linux you will need some native libraries.
Even though this is highly experimental and unsupported it does work (at least for me).
Builds are available via Nuget from the package Core.System.Windows.Forms or at https://www.nuget.org/packages/Core.System.Windows.Forms/.
As of Alpha 4 this targets .Net 6.0 instead of .Net Core 3.1.
A Demo on my Raspberry Pi 4, built and running on the Pi using .Net Core 3.1.
Platform Requirements
Windows — None known
Linux — Several native libraries, at least libx11 (libx11-dev on Ubuntu) and libgdiplus (libgdiplus on Ubuntu)
Mac — Not currently working. The Mono code that this is based on was 32 bit only. .Net Core requires 64 bit so until that is done this will not work.
Samples
There are three samples: SimpleTest (which uses my .Net Core Winforms), SimpleTest.NetCore (which uses the official .Net Core Winforms) and SimpleTest.NetFX which uses Net Framework. This also shows how to use the same source code with all three different platforms as the code is added as a link to the NetCore and NetFX projects. This way you can use the officially supported and nice looking Winforms on Windows.
To test this on Linux simply dotnet run in the SimpleTest folder.
More samples are coming soon TM. This will include more complex forms and more demonstrations of using the different libraries for different platforms.
I tested the SimpleTest example on Windows, Raspbian Buster and Ubuntu 20.04 using .Net Core 3.1 Release.
Future Work
Unknown right now. I will likely add more samples and fix issues as I go. If Mono adds support for Mac 64 bit I will port that over.
I will add better Linux documentation as I have time.
License
The Mono code is under the MIT license (https://github.com/mono/mono/blob/master/LICENSE). My contributions are under the MIT license as well.
Posting Permissions
Forum Rules |
|