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

ctodx
11 November 2020

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 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.

Showcase Your Apps on DevExpress.com

Highlight your business app and share your development experiences with the DevExpress community. To include your app in our upcoming App Showcase, please forward an application screenshot to clientservices@devexpress.com and tell us which DevExpress products you currently use within your organization.
13 comment(s)
Glen Harvy
Glen Harvy
Keep up the great work guys. I'm sure the wait will be worth it.
11 November 2020
Marc Greiner (DevExpress MVP)
Marc Greiner (DevExpress MVP)

Thank you Julian for sharing this!

I waited for your blog the whole day, just to see it one minute before going to bed! I couldn't wait to read it.

Now I will have nightmares of crashing Microsoft Visual Studio by editing a padding in its designer... Haha!

Does Microsoft really want us to embrace .NET 5? Question to Microsoft: What is so complicated to allow smart tags, event handlers and custom glyphs in the WinForms designer? The previous engineers were able to do it for .NET Framework! Isn't .NET 5 supposed to be better?

11 November 2020
Yahya
Yahya

"What is so complicated to allow smart tags, event handlers and custom glyphs in the WinForms designer?"

Good question. Is MS gradually letting go anything that in any way can be used on-premises?

11 November 2020
Jacobo Amselem
Jacobo Amselem
what's the status of the XtraReport designer specifically? is somewhat usable?
12 November 2020
Christopher Jay
Christopher Jay
Thank you for your continued commitment to WinForms.  We have several applications using WinForms that are used on almost 10,000 clients around the world and we have no plans to migrate off of it anytime soon.  Thanks for your hard work.
12 November 2020
Appy Developers
Appy Developers

:)

i dream of a day where i walk down the github street, and see the Winforms/XAML designers of Visual studio open sourced.

I suggest that all 3rd party vendors, ask Microsoft politely, to open source "Winforms/XAML designers", so all 3rd party vendor and other developers, help in fixing/enriching these designers, and lessen the cost of development on MS, and speeding their development and bug fixes.

the license can be a special one that saves MS ownership, but pave the way to speed their development.

and maybe, a day will come, that we see these designers in 64bit.

https://developercommunity.visualstudio.com/idea/1254192/open-source-visual-studio-winformsxaml-designers.html


Regards.



12 November 2020
Julian Bobbett 1
Julian Bobbett 1
I suspect Microsoft have been trying to kill WinForms for almost 15 years now (since Wpf), and they're constantly disappointed that it holds so strongly. This is mostly thanks to companies like DevExpress who have taken WinForms to places no one thought it could go. From a business solutions perspective, I won't even be tempted to migrate the .Net Framework WinForms apps to .NET 5 until these issues are sorted out. Why give myself endless headaches when the current solution is so thoroughly tried and tested?
13 November 2020
Venu Choudary
Venu Choudary
Any ETA on anything regarding full support like old Winforms in .NET 5 from Microsoft and DevExpress ?  I am asking since, i am excited about both .NET 5 and Devexpress Winforms for the same.
14 November 2020
Dmitry Tok (DevExpress Support)
Dmitry Tok (DevExpress Support)

@Jacobo:

The Visual Studio Report Designer is not available in this Early Access component distribution. You can either create a sample app with a standalone report designer as described in this help topic:  End-User Report Designer -> Quick Start (to work with report layouts in your application) or use the approach with an auxiliary project to create new reports in .NET 5 desktop apps: Reporting in .NET Core 3 (CTP).   

 

16 November 2020
Crono
Crono

Julian,


"Finally there are a few features and controls that are not available in the current version: XPO, reporting, and XtraDialogs."


Can you elaborate on this? Are we still just talking about design time experience?
 

19 November 2020
Colin Wynn
Colin Wynn

The Reporting in .NET Core 3 (CTP) solution doesn't work well with a multi project solution all in .NET Core 3, and soon .NET 5 that uses a varierty of inhouse nuget packages, because that would mean rebuilding all nuget packages to target Standard for a solitary app, as well as having some of the solutions projects also target Standard :(

Come on DX, you guys can do better than this :(

20 November 2020
Mork Nic
Mork Nic

I do agree with Yahya on "..Is MS gradually letting go anything that in any way can be used on-premises?"

I think so because they are trying to force all developments to go cloud, especially Azure so as to increase their cloud revenues. But they seem to forget that not all applications are cloud worthy and that some apps will be on-prem forever, preferably Winforms and not web app.

I do dream of the day DevExpress will develop their own IDE, and i promise you my team would stop using visual studio immediately and forget about all the headaches microsoft gives its customers, and i can bet a DevExpress IDE will be miles ahead of VS, just as can be seen between DevExpress controls and the ones that come with VS.

To Team DevExpress I can say you guys are the best that has ever happened to me and my team since we started writing codes. Keep up the good works and we shall stick with you forever. Thumps up to you guys.

22 November 2020
Arsen (DevExpress)
Arsen (DevExpress)

@Crono:

We're going to introduce .NET 5 support for our XtraDialogs with the next Early Access NuGet feed update. Both XPO and DevExpress Reports have limitations related to the design-time experience, however, they work just fine at runtime. We remain hopeful that Microsoft will do what needs to be done so we can deliver a great design-time experience for .NET 5.

25 November 2020

Please login or register to post comments.