- Windows Forms Designer for .NET Core Released
- How to use the designer
- What’s available in the designer
- What’s coming next
- New in 16.6 GA release
- New in 16.7 Preview 1 release
- Known issue
- Give us your feedback!
- Windows forms net core designer vsix package
- Updates on .NET Core Windows Forms designer
- This release contains
- Coming next
- How to use the designer
- How to report issues
- 66 comments
Windows Forms Designer for .NET Core Released
Today we’re happy to announce that the Windows Forms designer for .NET Core projects is now available as a preview in Visual Studio 2019 version 16.6! We also have a newer version of the designer available in Visual Studio 16.7 Preview 1!
Don’t forget to enable the designer in Tools > Options > Environment > Preview Features.
Many of you may remember that we open-sourced Windows Forms and ported it to .NET Core with .NET Core 3.0. Since then, we’ve been hard at work bringing the Windows Forms designer experience to .NET Core. While we are getting closer to completion, we are continuing work on the designer and plan on bringing more functional and performance improvements in the near future.
How to use the designer
- Install Visual Studio 2019 version 16.6 or Visual Studio 2019 version 16.7 Preview 1.
- To enable the designer in Visual Studio, go to Tools >Options >Environment >Preview Features and select the Use the preview Windows Forms designer for .NET Core apps option.
After completing these steps, once you double-click on your form in the Solution Explorer, the designer will open automatically the same way it is for .NET Framework applications.
Improving the performance is our next goal after we complete the functionality work, so don’t get upset if it’s not as fast as you envisioned while the designer is in the preview, that’s something we will improve in the future.
Currently the new Windows Forms designer works only on Windows 10.
What’s available in the designer
- All Windows Forms controls except DataGridView and ToolStripContainer (these are coming soon)
- UserControl and custom controls infrastructure (only available since Visual Studio 16.7 Preview 1 version)
- All designer functionality, such as
- drag-and-drop
- selection, move and resize
- cut/copy/paste/delete
- integration with Properties Window
- events generation and so on
- New WebView2 control This chromium-based embedded browser control allows to render web content (HTML/CSS/JavaScript) for .NET apps. It is supported in both .NET Core and .NET Framework platforms for Windows Forms and WPF applications. You can find a getting started tutorial in the Microsoft documentation and we will publish a blog post dedicated to WebView2 control in the nearest future.
- Local resources
- Partial support for localization
- Localizable properties of the controls and UserControl can be serialized into ResX-files (by setting Localizable property to true ).
- Different languages are supported via changing Language property.
- Additional Cultures are added in the preview of .NET 5 according to the International Components for Unicode Standard (ICU).
What’s coming next
- Project resources
- Complete localization
- Inherited dialogs support
- Data binding scenarios
This work is in progress, and you already can see some results in the Visual Studio 16.7 Preview 1 designer.
- Third-party control vendors support
New in 16.6 GA release
- All Dialogs controls
- PropertyGrid
- HScrollBar
- VScrollBar
- DomainUpDown
- TrackBar
- Drag-and-drop improvements
- Selection improvements
- Stability and bug fixes
New in 16.7 Preview 1 release
- UserControl and custom controls infrastructure
- TableLayoutPanel
- Fundamentals for third-party controls support
- Fundamentals for data binding support
- Improvements in designer interaction with the TableLayoutPanel
Known issue
Some users might not see some controls (like Button, CheckBox, etc.) in the Toolbox. That happens due to the Toolbox cache corruption issue that will be fixed in the next version. Meanwhile, there is a simple way to fix it on your machine:
- Right-click on the Toolbox >Choose Items…
- In the Choose Toolbox Items dialog click “Reset” button
This should fix the problem.
Give us your feedback!
Your feedback is important to us! Please report issues and send feature requests via the Visual Studio Feedback channel. Use the “Send Feedback” icon in Visual Studio top-right corner as shown in the following image and specify that it is related to the “WinForms .NET Core” area.
Windows forms net core designer vsix package
Windows Forms .NET Core Designer
The .NET Core Windows Forms visual designer will be part of a future Visual Studio 2019 update, but it is currently available as a pre-release Visual Studio extension. We have a preview version available with limited functionality in the designer documentation.
📢 Please see the designer documentation for the download link to the Installer Package (VSIX), known issues and other release notes.
Using the .NET Framework WinForms Designer with WinForms Core
If you have complex design work to do and prefer to use the workaround to invoke the .NET Framework Winforms Designer, you can use Visual Studio’s option to work with linked files and use its WinForms Designer for the .NET Framework. The instructions are below:
☝️ TIP: During the process, you need to re-nest Form files in the .NET Framework project whenever you add a new Form or a UserControl . Instead of using a text editor for patching the project file, you can use Mad Kristensen’s File Nesting Extension, which is recommended to be installed beforehand.
Please close every open instance of Visual Studio before installing this extension.
Create WinForms .NET Core app
Create a new WinForms application targeting .NET Core from Visual Studio or your favorite command line interface.
Create in Visual Studio
- File > Add > New Project. > Windows Forms App (.NET Core), choose C# or Visual Basic
- Specify project name, e.g. SimpleWinForms
Create from command line
Open your favorite console, create a new folder for your application:
☝️ TIP: You can have the folder name different from the project’s name. Use the option -n (or -name ) for that when using dotnet new .
☝️ TIP: For Visual Basic projects use the option -lang vb when using dotnet new .
After creating the project, you can run the application:
Prepare WinForms .NET Core app for the Designer
There are few options available to help you to design UI for your .NET Core project.
Open the SimpleWinForms project file by double clicking on it in Solution Explorer. Change the TargetFramework property from:
Add for any and every form file you have in this ItemGroup :
After doing these steps this is what you should end up with:
Add a new Windows Forms App (.NET Framework) project (VS2017: Visual C# > Windows Desktop / VS2019: C# : Windows : Desktop) to the solution (File > Add > New Project. )
Name the new .NET Framework project as the .NET Core project, but add «.Designer» to it (e.g. SimpleWinForms.Designer )
Go to the .NET Framework project properties and set the default namespace to the .NET Core project’s namespace
Delete the existing Form files in both projects
Add a new Windows Form in the .NET Framework project’s context menu Add > Windows Form.
In the section list, click on Windows Forms, and chose Windows Form from the installed templates
Give the name and click [Add] .
❗ IMPORTANT: You need to trigger a form change event for the Designer to create a resx file. You can do it by resizing the form for a couple of pixels or changing the form’s Text property. Don’t forget to save.
Now we move the form to the .NET Core project.
In the Solution Explorer click on the form and press CTRL + X to cut it; and then paste it in to the .NET Core project ( CTRL + V ). Check that the main form file, the .designer file and the resource file for the form are all present.
Then we link the form back into the .NET Framework project back.
Remember: We can only use the Classic Designer, but we want to have only one set of files. So the form files, of course, belong to the .NET Core project but we want to edit them in the context of the .NET Framework project (thus using the .NET Framework Designer).
To do this open the context menu on the .NET Framework project in the Solution Explorer, and pick Add > Existing Item
In the File Open Dialog, navigate to the .NET Core project, select the Form.cs, Form.Designer.cs and Form.resx files and choose Add as Link option.
Compile the solution to see if the file references were set up correctly
As the last but important step, we need to re-nest the linked form files.
If you installed the File Nesting Visual Studio Extension then that is done easily: Select both the Form.Designer.cs and Form.resx file, and from the context menu click File Nesting > Nest Items. In the dialog, pick the main form file (Form.cs), and click OK.
Now, whenever you need to use the Designer on one of the .NET Core Form or UserControl files, simply open the linked files in the .NET Framework project with the Windows Forms Designer.
If you are porting an existing .NET Framework application to .NET Core you may wish to read the following blog posts:
Updates on .NET Core Windows Forms designer
March 17th, 2020
We released a preview version of Visual Studio 16.6 – Visual Studio 2019 version 16.6 Preview 1 and with it a new version of .NET Core Windows Forms designer.
This release contains
Support for the following controls:
- FlowLayoutPanel ,
- GroupBox ,
- ImageList ,
- MenuStrip (via the PropertyBrowser and context menu),
- Panel ,
- SplitContainer ,
- Splitter ,
- TabControl ,
- TableLayoutPanel ,
- ToolStrip (via the PropertyBrowser , context menu and designer actions).
Local resources and localized forms were enabled in the designer.
Support for LayoutMode and ShowGrid/SnapToGrid settings via Tools->Options.
Reliability and performance improvements.
Other minor fixes and tweaks.
Coming next
In the future releases we will be working on User Controls and third-party controls support, integration with popular controls vendors, support for Data Controls and related scenarios, performance improvements and other features.
How to use the designer
- You need to use Visual Studio Preview channel
- You need to enable the designer in Visual Studio. Go to Tools >Options >Environment >Preview Features and select the Use the preview Windows Forms designer for .NET Core apps option.
How to report issues
Your feedback is important to us! Please report issues and send feature requests via the Visual Studio Feedback channel. Use the “Send Feedback” icon in Visual Studio top-right corner as shown below and specify that it is related to the “WinForms .NET Core” area.
Olia Gavrysh
Program Manager, .NET
Read next
66 comments
how many controls are left so far?
The current version is missing: Dialogs, Components, Data, User Controls and a few other controls (NotifyIcon, PropertyGrid, HScrollBar, VScrollBar, DomainUpDown, TrackBar)
The next version will have many of them in.
Hi. Will this be also available soon for Linux?
Why would it be available for Linux? Visual Studio isn’t available for Linux and Windows Forms is Windows-only.
No, WinForms and WPF will remain Windows-only because they are build on top of Windows APIs.
If Winform will work only in Windows, then what difference it will make if I will just stay in .Net Framework.
Any news on whether ListView and TreeView support is being added?
They were enabled a while ago. We have a few known issues related to them, which we will fix in the future.
So what version of the designer ships with 16.5? I had a test project I was using without the designer and after the 16.5 update double clicking on a form in the Solution Explorer launches a designer of some sort without adding any extensions or turning on any preview features (it’s the 16.5 release, not a preview). Before the update double clicking a form went directly to code view. The containers don’t seem to work right though, I can’t add anything to group boxes and when controls on tab pages seem to snap back to the top left.
The preview version was enabled by mistake in 16.5 and fixed in the 16.5.1 update. Now the release channel of VS (16.5.1 and up) has .NET Framework WinForms designer for .NET Framework apps and no designer (yet) for .NET Core apps. And in the VS 16.6 Preview 1 there is a preview .NET Core WinForms designer for .NET Core apps and .NET Framework WinForms designer for .NET Framework apps.
Nice work!! Keep it up.
Anyway. . .Will this version of Windows Form support a Crystal Report Viewer and Report Viewer (or any new tools for creating report) ??
This is in our backlog to investigate. Thank you for bringing it up, good feedback!
If only you all knew how happy devs are to see this comment in our start-up… Crystal report is the only thing tieing us to .net Framework
When we could expect final completed version of designer ?
is it planed until .net 5 ?
when third parties will be supported ?
We expect to have a mature version by mid of May.
We are already working with the control vendors, we might have some support by May, but fully supported they should be by .NET 5
will this now properly support hidpi screens and scaling in the ide without having to restart in 100% scaling mode?
Not yet, for now HighDpiMode is set by default to SystemAware and we plan to continue working on HiDPI improvements.
I’m using the newly released 16.5.0 on a .NET Core Project. All the mentioned controls (Except the MenuStrip, TableLayoutPanel, and Toolstrip) are already there. You might need to update what is actually coming in 16.6 and what is already available in the existing version 🙂