In the latest .NET Core version v3.1, Microsoft introduced numerous enhancements. The biggest enhancement announcement was support for desktop technologies, WinForms and WPF.
We're pleased to announce that with the 2020v2 release, ComponentOne for WinForms and WPF are fully compatible with the latest .NET Core version 3.1.
In this post, we'll share announcements relating to .NET Core 3.1 and describe how to use .NET Core 3.1 in any existing desktop application.
For WinForms, ComponentOne had already started to support .NET Core 3.1 in 2020v1 hotfix release and with the latest 2020v2 release all .NET 4.5.2 WinForms/WPF controls are now .NET Core 3.1 compatible except for C1Editor control and the legacy controls.
Customers planning to port their .NET Framework based applications to .NET Core 3.1 should update to use the 2020v2 controls and continue developing their desktop applications using the most compatible WinForms/WPF controls.
Microsoft announced the .NET Core version 3.1 at the end of 2019 and the most highlighting feature was that the .NET Core v3.1 is a long-term supported (LTS) release and will be supported for three years. The next release after .NET Core 3.1 will be .NET 5 and it will be the only .NET platform meant for new applications going forward.
However, behind the scenes, .NET 5 is simply the next iteration of .NET Core 3.1, so by porting an application to .NET Core 3.1, you're preparing for the future of .NET 5, expected by November 2020. Hence, .NET Core 3.1 is an important link between .NET Framework based applications and the future .NET 5.
Being an industry leader in providing WinForms/WPF UI components, ComponentOne is taking strides to provide controls compatible with the latest framework updates, by supporting .NET Core 3.1.
To demonstrate how any desktop application developed with .NET framework can be ported to .NET Core 3.1, let's discuss migrating the product sample 'Showcase' to .NET Core 3.1.
For this post, we'll be using one of our product samples 'Showcase', a Product Information Management WinForms application. To demonstrate the scenario, the application utilizes many of the latest enhancements in ComponentOne WinForms edition, like new Rules Manager control, themes and shows different operations with FlexGrid and Ribbon controls: searching, formatting, and data grouping.
This application is a standalone app and is one of the latest addition to the product samples repository shipped along with the product and can be found installed at location:
If you cannot find the Showcase sample at above location in your machine, please ensure to have installed the latest ComponentOne version and checking the 'Install Samples' option while running the product installer.
ShowCase sample UI: FlexGrid, Ribbon, Themes and RulesManager, all together
Before porting the application to .NET Core 3.1, you need to do some preparation first.
Before modifying the original application, make sure to have a copy of the original .csproj file, you might need to use it in the future.
<PropertyGroup>, add the following statement:
Running the application, you shouldn't receive any errors and with that, you’ve successfully migrated the WinForms project to .NET Core 3.1.
Note: The same steps are applicable for porting any existing .NET framework based WPF application.
Currently, the WinForms UI designer do not function in projects targeting .NET Core 3.1. So, it is not possible to drag & drop the component from VS toolbox to Windows forms.
In addition to continuing support for .NET Core 3.1+, with the upcoming versions ComponentOne plans to make the .NET 5 controls come out of beta and officially support .NET 5. Also, MS is currently working on a new design-time model for .Net Core application and once it is stable, the ComponentOne WinForms designer might be available in one of the upcoming versions.
Please leave us your thoughts in the comments below, and happy coding!