Windows Forms Designer for .NET Core Released

Olia Gavrysh

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!

.NET Core Windows Forms designer in Visual Studio

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

Enabling .NET Core Windows Forms designer in Visual Studio Settings

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
We are working closely with the control vendors such as Progress Telerik, DevExpress and GrapeCity on supporting their controls in the Windows Forms designer in the nearest future for .NET Core and .NET 5 projects. We are also collaborating with ActiPro, Infragistics, and SyncFusion. On the following picture, you can see Progress Telerik controls in Windows Forms application targeting .NET 5.

Using Progress Telerik RadGridView control in .NET 5

New in 16.6 GA release

The following controls support and improvements have been made in the 16.6 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

The following controls support and improvements have been made in the 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:

  1. Right-click on the Toolbox > Choose Items
  2. 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.

Giving feedback directly from Visual Studio

Getting started:

Porting

70 comments

Discussion is closed. Login to edit/delete existing comments.

  • Jérôme Mével 0

    Could you please tell me why the checkbox control is missing from my designer for several months now and doesn’t even show up when I debug?
    https://stackoverflow.com/q/61989363/1203116
    This is really annoying. Is this a bug?

  • Ismail Demir 0

    Hi,

    Sys: Win7 Sp1+
    VS16.7pre1
    net5.0pre4 (VisualBasic should be supported/planned!)

    (1). Handles.

    If you create a new VB template (core 3.1 or net5.0) and add a button on a new form then the handles will be not added. If you activate the button by double click there is no handles.

    –> Closing project and open it again then double click on that button will be add generic button subs like Button1_Click_1, …Click_2, …Click_3, etc

    (2). Will be CreateObject like CreateObject(“Microsoft.Update.Session”) work along with NetCore?

    I’m porting my VB tools to Core and use the new Namespace paths but I have issues with the CreateObject. I could import WuApi ref instead of using CreateObject but I am not happy with the growing file size.

    (3). Releasing

    If you release a VB project (template) to a folder with the “release mode: single”, it ends with errors. (core 3.1 and net5.0)
    But if the release mode is “framework” and the option “create single file” is checked then it runs without errors.
    Note: This option is not available on net5.0.

    (4). Native support.

    Will be a native support for VisualBasic WinForms Applications?
    Currently I have to install net core runtimes like NetFramework before.

    (5). How can be WinForms XP styles activated on Net Core?

    (6). Thank you!
    I could post to the “net team” blog in visualbasic section but its not worth giving feedback there. Except you, Olia and Kathleen, there is no feedback from the so called “Net Team”! Experienced people gave their feedback there but without any response. Thank you for speaking with us Olia and Kathleen!

  • Phil Ryan 0

    I’ve also had to reset the toolbox controls, but also wondering I am the first person to but a button on a Tab Control!?

    I get an explosion of error dialog boxes with windows all diagonally offset…and object not set to a reference errors. When I did have that working in a previous version it also wasn’t responding to a click event …What I was playing around with, trying to make work (assuming it was me) when I did the upgrade.

    • Wim Vanlerberghe voestalpine 0

      Yes, unfortunately, if you are making a Windows Form app with .Net core, VS2019 16.6, then nu button is in the toolbox 🙁 . And it can also not be selected in the items 🙁
      Next version ?

      • Daniel Smith 0

        If you can right click in the Toolbox window and select Reset Toolbox then the Button will be restored. The only problem is (at least for me) that resetting the toolbox also causes all the icons to become mixed up, but this is just a visual bug.

        • Wim Vanlerberghe voestalpine 0

          Thanks for your reply.
          But: even after resetting the toolbox, it is not visible.
          Notice: on my second computer, also with the version 16.6, it is visible indeed, so there i don’t have the problem.
          Possible reasons:
          – the bad computer is an upgrade from 16.5.5 to 16.6, while the good computer was immediately 16.6
          – …
          Now i did enter the code to make the button immediately in form1.Designer.cs, so i have my button 🙂
          Thx

  • ben zhai 0

    Hi, is there any docs or samples helping vendors to make their custom controls support .NET Core WinForm Designer?

  • Matt Slay 0

    Please improve designer support for creating User Controls containing child controls (like a Label and a TextBox), then after we drop it on a Form, we want to override properties on the child controls by selecting them in the designer and using the Properties window in Form Designer to override property values.

    One of my biggest complaints of WinForms is how hard it is create User Controls where we can alter/override the properties of child controls in the User Control once it is dropped onto a form. You cannot use the Properties window of the Form Designer to assign Label text in a User Control from the designer environment… You have to go into code-behind window and do it in code: userControl11.label1.Text = “Custom Label Text”;

  • Salih AVCI 0

    Hi Olia,

    First of all, thank you for continuing .Net Core windows form application development.

    When are all toolbox items available for .Net Core applications in preview version or full version?

  • David Porter 0

    I couldn’t find the ReportViewer control, tell me it exists?

  • Jesse Dickey 0

    For some reason, even though this is supposedly a preview feature, it was already checked as enabled. But it doesn’t seem to be enabled. I don’t see any way to bring up the designer for my form.

  • 龙 张 0

    Nice, but found that there is no button control with VS version 16.6.3 & .net core 3.1.0
    no button control

  • Tristan K 0

    Doesn’t seem to work on ARM64. I either get a message about the program not working on my version of Windows, or “Object reference not set to an instance of an object” when trying to open a Form in the designer view.

Feedback usabilla icon