Use .NET Core build modern desktop applications

We want to talk about today is mainly desktop development in four areas: Windows platform, WPF on .NET Core 3 platform, Winform, packaged application solutions MSIX Islands and XAML controls access to the original UWP, let our application rapid modernization.

Application development on the Windows platform, we tend to choose the following three technologies:

  • Windows Forms
  • Windows Presentation Foundation
  • Universal Windows Platform (UWP)

But in fact, what you really want is aimed at Windows. Windows is a platform. These options only for us when developing Windows applications have different UI framework options. More importantly, when you optimize your application for 10:00 Windows, you will get more innovation, benefits Api and windows 10 operating system provides you.

It is seen as a platform to Windows.
UI framework is just a preference

 

Moreover, these three UI framework are now open source:

 

WPF and Windows Forms are based on open source .NET Core 3.0, you certainly have questions about why .NET Core 3. Give me a reason?

.NET Framework 4.8 has been released, .NET 4.8 has helped us solve a lot of problems, WPF and Windows Forms high DPI better this point, Windows 10 new controls in the latest browsers and media players, and supports the latest standards . .NET Core 3 is the next major release of .NET Core. The main features of the forthcoming version is support for Windows desktop applications, including Windows Forms and WPF applications. You will be able to run new and existing Windows desktop application and experience all the benefits of .NET Core have on .NET Core 3. Hosted  XAML island in the UWP controls can also be used in Windows Forms and WPF applications for .NET Core 3's.

.NET Core better performance, faster, .NET Core parallel installation features can help you get the obvious convenience in publishing applications, better packaging solutions MSIX, open source, supports .NET Standard 2.1, support for C # 8.0, etc. there are many new features.

 

The benefits of using .NET Core 3 upgrade Windows desktop application development, there are many, following a brief few columns:

• Modern runtime, BCL and language functions

• Easier access to the platform and device API

• Modern and accessible UI and input

• Conduct for DevOps seamless application deployment, updates and optimization

• Agile developers better innovation

 

.NET Core 3.0 will be released next month, RC, 9 was officially released, long-term support version 3.1 will be released in November, 2020, released in November .NET 5, in fact, .NET Core 4.0, in order to avoid confusion and .NET 4 and unified .NET consider a unified brand, called .NET 5, back

Released a major release every year, it is the even release of LTS.

 

Now you can try a hands-on, sdk Note that you need to install the corresponding version of the building when the 32-bit or 64-bit applications, the simplest is two versions of the SDK are installed. Download: https://dotnet.microsoft.com/download/dotnet-core/3.0

.NET portable analyzer can help you identify your code portable or non-portable to. Net Core part, Excel provides a complete report for you. The first step is to migrate from package.json PackageReference.
The easiest way is to create a run "dotnet new wpf" or "dotnet new winforms" empty csproj.
You can use csproj generated as a starting point, the migration from the old csproj your PackageReferences, and then start from there.
Most projects should be quite advanced.
If you need more information, follow the steps in the blog post. It is very complete. https://aka.ms/porting-to-netcore3

WPF Demo

 

MSIX is a Windows application package format, can provide modern packaged experience for all Windows applications. MSIX is based on a composition .msi, appx, app-V and installation techniques ClickOnce constructed safe packaging format.

  • Installing and uninstalling the case can not pose a risk to the computer or cause a "computer-rot" of
  • Out of the box with automatic updates
  • Easier to distribute, store by Microsoft, the company's own Microsoft store, file sharing, HTTP URL distribution

Starting Windows 10 version 1903, you can be  UWP XAML controls directly added to the WPF associated with the window handle (HWND) of, Windows Forms or C ++ Win32 application in any UI elements. This means that you can UWP the latest features (such as  Windows Ink  and support  Fluent Design System  controls fully integrated into other display surface, and Windows desktop applications to go.  This program developers sometimes called "XAML island."

About Windows development, one of the biggest complaints is Microsoft's investment in less Winforms and wpf's; most of the new features are provided only for Windows10 UWP build. Although we can now call the UWP API from .NET Framework, but only for cases that do not involve the UI. To solve this problem, Microsoft has created two new controls: WinForms XAML Host and WPF XAML Host, enables developers to embed written UWP UI to an existing WinForms / WPF applications.

Guess you like

Origin www.cnblogs.com/shanyou/p/10992699.html