[New re zero]MAUI is there.Net Preview 3’s latest progress

[Tag: ]

  

  we are at.NET?6?PREVIEW?3 delivered.NET multi-platform application UI mobile and the latest developments in desktop development.This version adds a Windows platform and WinUI?3,Improved basic applications and launch builders,Added the original life cycle event,And add more UI controls and layout.We also introduce some new semantic properties to the auxiliary feature.When we discuss these detailed discussion,We invite you to use DOTNET with us?NEW creates new applications,And share your feedback.

  Project Reunion 0.5 has been released!right now,Windows has added Android,iOS and Macos,Be you can use.Net Maui arrives at the target platform!You can start experiencing from the Project Reunion installation instructions.In this release,We created a sample project,You can from Visual Studio 2019 16.10 PREVIEW began to explore.

  

  Once there is necessary for Project Reunion.NET 6 foundation construction architecture,We will add Windows to our single project template.

  Because we are still in the early stage of preview,So all the dependencies required to install mobile and desktop development are still manually operated.To help you and us,Jonathan Dick sorted a useful tool DOTNET TOOL,It can evaluate your system and collect the required components as much as possible.Use this tool to install MAUI-CHECK DotNet Tool Install -G Redth globally from the command line.Net.MAUI.Check

  Source: https: // github.COM / Redth / DotNet-Maui-Check

  

  Now run>?MAUI-CHECK and follow the instructions.After success,You can create your first application: DOTNET New Maui -n Hellomaui

  Step by step instructions on installation and entry,It is also possible to refer to: https: // github.COM / DOTNET / MAUI / WIKI / Getting-Started.

  .Net MAUI uses Microsoft.Extensions HostBuilder launches each application.This provides a consistent pattern for application developers and library maintenance personnel.To quickly develop applications.Each platform has different starting points.But your application entry is consistent in Startup.CS.Here is a simple example:

  it’s here,You can execute such as registration fonts and registration Xamarin.Forms renderer or custom renderer compatibility.This is also where you introduce your app,That is to realize Application and (at least) responsible for creating a new Window:

  In order to present your content,A view will be added to MainWindow:

  That’s it!You now have a window with content.

  Preview 3 further improves the startup extension,ConfigureCycleevents introduced to easily connect to the native platform lifecycle event.This is an important introduction,Especially for single project experience,It simplifies the initialization and configuration required for many libraries.

  The following is a simple example.Associate the program to the Android back button event and processes as needed:

  Now let’s take a look at how other libraries use these methods to simplify their platform initialization.Essentials (Microsoft.MAUI.Essentials) library is.Part of NET MAUI,It provides a cross-platform non-UI service,We can use this library to configure all the contents needed to all platforms in a unified location:

  In the Essentials code,You can see how the ConfigureSsentials extension method is created.And how to link to platform lifecycle events,This greatly simplifies the across platform native configuration.

  You can view the complete class in DOTNET / MAUI.We look forward to seeing more Cuburi uses this model to simplify their usage.

  In addition to from Xamarin.Existing compatible renderers in Forms,We will continue.Add more controls in Net MAUI,Attributes and layouts.If you use the code above as a starter,Then you can only use the Currently implemented Handlers.To see the currently implemented content,You can view the Handlers Folder At DotNet / MAUI.

  In order to track our next work,We offer a Project Board for all the Handlers we have already accepted by Pull Request. Everyone can check.

  The layout also updated in Preview 3.Grid now supports absolute sizes and automatic size (same as the content size).The LayoutAlignment option can now be used for Grid and StackLayout,So you can start using the HorizontALLAYOTALIGNMENT and the VerticalLayoutAlignment property to locate the view.

  We have been working with many customers,To better understand common difficulties encountered in achieving accessibility across multiple local platforms,And how to make it.It is easier in Net MAUI.One of the measures taken for this is to add new semantic properties.Map across platform properties to native accessibility properties.

  For more information,See the original description and discussion of this DotNet / Maui Issue.