Design-Time Support for DevExpress WinForms Controls for .NET 5

11 November 2020

***UPDATE*** For the latest news about the Visual Studio WinForms Designer supporting our controls with .NET 5, please see this FAQ in our Support Center: Design-Time Support for DevExpress WinForms Controls for .NET 5 - FAQ. We shall be updating this FAQ page as and when we get more information.

Back in July this year, I announced that DevExpress controls had been enhanced such that they supported the latest .NET 5 Preview. However, I did warn that, although we’d been working hard to ensure that our WinForms controls were compatible with .NET 5, it was a different story with regard to the designer support in Visual Studio. Now that .NET 5 has been officially released along with Visual Studio 2019 v16.8, it is time to talk about what to expect from design-time tools using DevExpress WinForms v20.2.

The Good News (yes, unfortunately, some bad news will follow)

While the WinForms platform has yet to fully address important design-time issues, Microsoft has made good progress for those considering .NET 5. For example, you can call up smart tag menus for a control...

Smart tag menu

...use the control designers...

Grid control designer

...and utilize the stand-alone designer dialogs for to set complex properties, such as the Mask Settings dialog for our recently overhauled editor input masks.

Mask settings dialog

Basic operation

In order to develop a new WinForms app that targets .NET 5 with DevExpress UI controls, you should do the following:

1) Install Visual Studio 2019 version 16.9 Preview 1 with the “.NET Core development tools” option checked in the VS Installer.

2) Register the special Early Access NuGet feed as described in this help article: Setup Visual Studio's NuGet Package Manager. We’re distributing our .NET 5 controls via a separate feed because, as you’ll soon see, Microsoft still has to implement a few details that are crucial for our complete design time support.

Note: at this moment, the NuGet feed is the only way to get the latest DevExpress WinForms controls optimized for .NET 5. DevExpress WinForms v20.2 controls distributed via the classic .NET Core installer available in our Download Manager can also operate under .NET 5, but lack the design-time support.

3) In Visual Studio, make sure your application targets .NET 5.0. Go to “Project | Manage NuGet Packages...”. Select the feed you registered in step #2 and install the pre-release package with the required localization culture. Each package includes all available DevExpress WinForms controls.

NuGet Package Manager with Localized WinForms packages

4) Once the selected package has been installed, you can add DevExpress controls from the Visual Studio toolbox.

Visual Studio Toolbox with DevExpress controls

Now the Bad News – Known Issues

While design-time features/capabilities mentioned above seem to indicate that .NET 5 is ready and usable (it indeed is usable for basic WinForms controls inside Visual Studio), important limitations/issues remain with standard WinForms designer interfaces. These limitations cannot be “worked around” – these issues mean that our sophisticated WinForms controls are not fully supported in the designer at this time. Of course, Microsoft will be enhancing these interfaces in future Visual Studio builds and DevExpress WinForms design-time support will follow. At this time, we don’t have guidance from Microsoft as to when such changes will be ready and so we cannot offer exact release timeframes to our users. Some examples of why we have yet to deliver the best possible design-time experience for .NET 5:

  • Properties that accept custom structures (for example, DevExpress.Utils.Padding) as values can appear in the Visual Studio Properties panel. However, any attempt to edit such a property may cause the IDE to crash.
  • Icons are not supported for controls that appear in the Visual Studio Toolbox. You can see that in the image above.
  • Custom glyphs cannot be rendered at design time. Our WinForms controls that target the regular .NET Framework utilize such glyphs to indicate bound UI elements, to show a button that invokes the Data Source Configuration Wizard, etc.
  • Data sources and bindings are not supported in the designer and can only be specified in code.
  • Some interactive features, such as dragging control elements, are not supported.
  • Our testing has shown that the process that hosts the WinForms Designer is prone to hanging.
  • A few other issues exist on the performance side, but we’ll describe such problems at a later time.

As you may know, DevExpress was the first component vendor to release a commercial WinForms UI control (nearly 20 years ago). Over the years, we’ve created some very sophisticated and intricate designers for our complex WinForms UI controls. We’ve focused resources on the design-time experience because we know it matters. A great design-time experience improves productivity and reduces development costs. This is not hyperbole – it’s a simple fact.

Generally speaking, our WinForms design-time experience is not dependent upon Visual Studio’s standard designer interfaces. Hence, to deliver the same design-time experience for .NET 5 as we do for earlier versions of the .NET Framework would require an uphill climb – one that is simply impossible at this time. We’d have to:

  • Add smart tag menus for individual control elements (grid columns, tiles, etc).
  • Create custom wizards, such as the Template Gallery, Data Source Configuration Wizard, Scaffolding Wizard, etc (not yet possible).
  • Extended smart tags (not yet possible).
  • Deal with designer dialogs that do not allow you to create event handlers.
  • Figure out a way to work around a missing Find Panel for Visual Studio properties.
  • Solve the issue of type conversion for DevExpress Editors.
  • And sort out what t do about non-operational Assistant components.

Finally there are a few features and controls that are not available in the current version: XPO, reporting, and XtraDialogs. The reason for these missing features is not related to major technical difficulties and will be addressed in future DevExpress releases.

The Future

We are excited about the possibilities and we are doing everything we can to bring a great design-time experience to .NET 5. I wish we had better news to share today but we will definitely keep our foot on the gas pedal and figure out what we can do for those of you considering .NET 5.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.