{"id":40109,"date":"2022-05-23T12:30:25","date_gmt":"2022-05-23T19:30:25","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=40109"},"modified":"2022-06-15T10:30:51","modified_gmt":"2022-06-15T17:30:51","slug":"introducing-dotnet-maui-one-codebase-many-platforms","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/introducing-dotnet-maui-one-codebase-many-platforms\/","title":{"rendered":"Introducing .NET MAUI &#8211; One Codebase, Many Platforms"},"content":{"rendered":"<p>Welcome to <a href=\"https:\/\/dot.net\/maui\">.NET Multi-platform App UI<\/a>. This release marks a new milestone in our <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/introducing-net-multi-platform-app-ui\/\">multi-year journey<\/a> to unify the .NET platform. Now you and over 5 million other .NET developers have a first-class, cross-platform UI stack targeting Android, iOS, macOS, and Windows to complement the .NET toolchain (SDK) and base class library (BCL). You can build anything with .NET.<\/p>\n<blockquote><p>Join us at <a href=\"https:\/\/mybuild.microsoft.com\/sessions\/599c82b6-0c5a-4add-9961-48b85d9ffde0?source=sessions\">Microsoft Build 2022<\/a> where we\u2019ll give you a tour of all the updates for building native apps for any device with .NET and Visual Studio. \u00bb <a href=\"https:\/\/mybuild.microsoft.com\/sessions\/599c82b6-0c5a-4add-9961-48b85d9ffde0?source=sessions\">Learn more<\/a>.<\/p><\/blockquote>\n<p>This is just the beginning of our journey to create a desktop and mobile app experience that delights .NET developers. For the next phase, the foundation is now established for the broader .NET ecosystem to bring plugins, libraries, and services from .NET Framework and the old project system to .NET 6 and SDK style projects. Among those available today are:<\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"background-color: white;\">\n<td><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_syncfusion.png\"><img decoding=\"async\" class=\"alignnone size-large wp-image-40133\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_syncfusion-1024x607.png\" alt=\"syncfusion controls for dot net maui\" width=\"640\" height=\"379\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_syncfusion-1024x607.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_syncfusion-300x178.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_syncfusion-768x456.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_syncfusion.png 1052w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/td>\n<td><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_telerik.png\"><img decoding=\"async\" class=\"alignnone size-large wp-image-40130\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_telerik-1024x590.png\" alt=\"telerik controls for dot net maui\" width=\"640\" height=\"369\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_telerik-1024x590.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_telerik-300x173.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_telerik-768x443.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_telerik.png 1083w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_devexpress.png\"><img decoding=\"async\" class=\"alignnone size-large wp-image-40131\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_devexpress-1024x572.png\" alt=\"DevExpress controls for dot net maui\" width=\"640\" height=\"358\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_devexpress-1024x572.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_devexpress-300x168.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_devexpress-768x429.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_devexpress.png 1052w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/td>\n<td><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_grial.png\"><img decoding=\"async\" class=\"alignnone size-large wp-image-40132\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_grial-1024x556.png\" alt=\"grial kit controls for .NET MAUI\" width=\"640\" height=\"348\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_grial-1024x556.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_grial-300x163.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_grial-768x417.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/hero_grial.png 1083w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table border=\"0\">\n<thead><\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left; vertical-align: top;\"><a href=\"https:\/\/github.com\/xamarin\/AndroidX\">AndroidX<\/a>\n<a href=\"https:\/\/github.com\/jsuarezruiz\/AlohaKit\">AlohaKit<\/a>\n<a href=\"https:\/\/docs.microsoft.com\/windows\/communitytoolkit\/mvvm\/introduction\">CommunityToolkit.MVVM<\/a>\n<a href=\"https:\/\/docs.microsoft.com\/dotnet\/communitytoolkit\/maui\/\">CommunityToolkit.Maui<\/a>\n<a href=\"https:\/\/www.nuget.org\/packages\/Xamarin.CommunityToolkit.MauiCompat\/\">CommunityToolkit MauiCompat<\/a>\n<a href=\"https:\/\/www.nuget.org\/packages\/Xamarin.CommunityToolkit.Markup.MauiCompat\/\">CommunityToolkit Markup.MauiCompat<\/a>\n<a href=\"https:\/\/www.devexpress.com\/maui\/\">DevExpress<\/a>\n<a href=\"https:\/\/github.com\/xamarin\/FacebookComponents\">Facebook<\/a>\n<a href=\"https:\/\/www.nuget.org\/packages\/FreshMvvm.Maui\">FreshMvvm.Maui<\/a><\/td>\n<td style=\"vertical-align: top;\"><a href=\"https:\/\/github.com\/xamarin\/GoogleAPIsForiOSComponents\">Google APIs for iOS<\/a>\n<a href=\"https:\/\/github.com\/xamarin\/GooglePlayServicesComponents\">Google Play Services Client Libraries<\/a>\n<a href=\"https:\/\/grialkit.com\/grial4-special-ms-build-release\">GrialKit<\/a>\n<a href=\"https:\/\/github.com\/jsuarezruiz\/MauiAnimation\">MauiAnimation<\/a>\n<a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/user-interface\/graphics\/\">Microsoft.Maui.Graphics<\/a>\n<a href=\"https:\/\/www.mrgestures.com\/\">MR.Gestures<\/a>\n<a href=\"https:\/\/www.nuget.org\/packages\/Prism.Maui\/\">Prism.Maui<\/a>\n<a href=\"https:\/\/www.nuget.org\/packages\/Plugin.Fingerprint\/\">Plugin.Fingerprint<\/a>\n<a href=\"https:\/\/www.nuget.org\/packages\/Plugin.InAppBilling\/\">Plugin.InAppBilling<\/a><\/td>\n<td style=\"vertical-align: top;\"><a href=\"https:\/\/www.nuget.org\/packages\/Plugin.StoreReview\/\">Plugin.StoreReview<\/a>\n<a href=\"https:\/\/www.nuget.org\/packages\/Plugin.ValidationRules\">Plugin.ValidationRules<\/a>\n<a href=\"https:\/\/www.nuget.org\/packages\/ReactiveUI.Maui\/\">ReactiveUI.Maui<\/a>\n<a href=\"https:\/\/shinylib.net\">Shiny<\/a>\n<a href=\"https:\/\/github.com\/mono\/SkiaSharp\">SkiaSharp<\/a>\n<a href=\"https:\/\/www.syncfusion.com\/maui-controls\">Syncfusion<\/a>\n<a href=\"https:\/\/www.telerik.com\/maui-ui?utm_medium=referral&amp;utm_source=microsoftblogs&amp;utm_campaign=maui-awareness-ms-ga-announcement\">Telerik UI for .NET MAUI<\/a>\n<a href=\"https:\/\/github.com\/jsuarezruiz\/TemplateUI\">TemplateUI<\/a>\n<a href=\"https:\/\/github.com\/aritchie\/userdialogs\">User Dialogs<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote><p>For help moving libraries to .NET 6, check out the recent guest blog posts detailing experiences shipping .NET MAUI libraries from <a href=\"https:\/\/devblogs.microsoft.com\/xamarin\/migrating-mrgestures-to-dotnet-maui\/\">Michael Rumpler<\/a> (MR.Gestures) and <a href=\"https:\/\/devblogs.microsoft.com\/xamarin\/tips-for-porting-your-xamarin-library-to-dotnet-maui\/\">Luis Matos<\/a> (Plugin.ValidationRules).<\/p><\/blockquote>\n<p>The .NET MAUI workload is fully supported under the <a href=\"https:\/\/dotnet.microsoft.com\/platform\/support\/policy\">Current release schedule<\/a> of 18 months, and will be serviced at the same monthly cadence as .NET. Our ongoing focus for .NET MAUI continues to be quality, resolving <a href=\"https:\/\/github.com\/dotnet\/maui\/wiki\/Known-Issues\">known issues<\/a> and prioritizing issues based on your feedback. This also includes the workloads we ship for building applications that exclusively target Android, Android Wear, CarPlay, iOS, macOS, and tvOS directly using the native toolkits from .NET, and the supporting libraries AndroidX, Facebook, Firebase, Google Play Services, and SkiaSharp.<\/p>\n<p>With .NET MAUI you can achieve no-compromise user experiences while sharing more code than ever before. .NET MAUI uses native UI via the premier app toolkits provided by each platform, modern developer productivity, and our fastest mobile platform yet.<\/p>\n<h2>Native UI, No Compromise<\/h2>\n<p>The primary goal of .NET MAUI is to enable you to deliver the best app experience as designed specially by each platform (Android, iOS, macOS, Windows, and Tizen thanks to collaboration with Samsung), while enabling you to craft consistent brand experiences through rich styling and graphics. Out of the box, each platform looks and behaves the way it should without any additional widgets or styling required to mimic. For example, .NET MAUI on Windows is backed by <a href=\"https:\/\/docs.microsoft.com\/windows\/apps\/winui\/winui3\">WinUI 3<\/a> the premier native UI component that ships with the <a href=\"https:\/\/docs.microsoft.com\/windows\/apps\/windows-app-sdk\">Windows App SDK<\/a>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/net-podcasts.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40088\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/net-podcasts.png\" alt=\"app UI on all four supported platforms\" width=\"1920\" height=\"1080\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/net-podcasts.png 1920w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/net-podcasts-300x169.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/net-podcasts-1024x576.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/net-podcasts-768x432.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/net-podcasts-1536x864.png 1536w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>Use C# and XAML to build your apps from a rich toolkit of more than 40 controls, layouts, and pages. Upon the Xamarin shoulders of mobile controls, .NET MAUI adds support for multi-window desktop applications, menu bars, and new <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/user-interface\/animation\/basic\">animation capabilities<\/a>, borders, corners, shadows, graphics, and more. Oh, and the new <code>BlazorWebView<\/code> which I\u2019ll highlight below.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/controls_sample.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40089\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/controls_sample.png\" alt=\"Image controls sample png\" width=\"3780\" height=\"2061\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/controls_sample.png 3780w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/controls_sample-300x164.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/controls_sample-1024x558.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/controls_sample-768x419.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/controls_sample-1536x837.png 1536w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/controls_sample-2048x1117.png 2048w\" sizes=\"(max-width: 3780px) 100vw, 3780px\" \/><\/a><\/p>\n<p>Read more in the .NET MAUI documentation about <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/user-interface\/controls\/\">controls: pages, layouts, and views<\/a>.<\/p>\n<h3>Accessibility First<\/h3>\n<p>One major advantage of using native UI is the inherited accessibility support that we can build upon with semantic services to make it easier than ever to create highly accessible applications. We have worked closely with customers to redesign how we develop for accessibility. From these conversations we have designed .NET MAUI <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/fundamentals\/accessibility\">semantic services<\/a> for controlling:<\/p>\n<ul>\n<li>Properties such as description, hint, and heading level<\/li>\n<li>Focus<\/li>\n<li>Screen reader<\/li>\n<li>Automation properties<\/li>\n<\/ul>\n<p>Read more in the .NET MAUI documentation about <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/fundamentals\/accessibility\">semantic services for accessibility<\/a>.<\/p>\n<h3>Beyond UI<\/h3>\n<p>.NET MAUI provides simple APIs to access services and features of each platform such as accelerometer, app actions, file system, notifications, and so much more. In this example, we configure \u201capp actions\u201d that add menu options to the app icon on each platform:<\/p>\n<pre><code class=\"csharp\">AppActions.SetAsync(\r\n    new AppAction(\"current_info\", \"Check Current Weather\", icon: \"current_info\"),\r\n    new AppAction(\"add_location\", \"Add a Location\", icon: \"add_location\")\r\n);\r\n<\/code><\/pre>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/platform-integrations.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40090\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/platform-integrations.png\" alt=\"Image platform integrations png\" width=\"1030\" height=\"724\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/platform-integrations.png 1030w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/platform-integrations-300x211.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/platform-integrations-1024x720.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/platform-integrations-768x540.png 768w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/a><\/p>\n<p>Read more in the .NET MAUI documentation about accessing <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/\">platform services and features<\/a>.<\/p>\n<h3>Easily Customized<\/h3>\n<p>Whether you\u2019re extending the capabilities of .NET MAUI controls or establishing new platform functionality, .NET MAUI is architected for extensibility, so you never hit a wall. Take, for example, the <code>Entry<\/code> control &#8211; a canonical example of a control that renders differently on one platform. Android draws an underline below the text field, and developers often want to remove that underline. With .NET MAUI, customizing every <code>Entry<\/code> in your entire project is just a few lines of code:<\/p>\n<pre><code class=\"csharp\">#if ANDROID\r\nMicrosoft.Maui.Handlers.EntryHandler.Mapper.ModifyMapping(\"NoUnderline\", (h, v) =&gt;\r\n{\r\n    h.PlatformView.BackgroundTintList = ColorStateList.ValueOf(Colors.Transparent.ToPlatform());\r\n});\r\n#endif\r\n<\/code><\/pre>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/border_entry-2.png\"><img decoding=\"async\" class=\"aligncenter size-large wp-image-40122\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/border_entry-2-1024x515.png\" alt=\"android default entry control compared to a styled entry control\" width=\"640\" height=\"322\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/border_entry-2-1024x515.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/border_entry-2-300x151.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/border_entry-2-768x386.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/border_entry-2-1536x772.png 1536w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/border_entry-2-2048x1029.png 2048w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Here is a great <a href=\"https:\/\/www.cayas.de\/blog\/dotnet-maui-custom-map-handler\">recent example<\/a> of creating a new Map platform control by Cayas Software. The blog post demonstrates creating a handler for the control, implementation for each platform, and then making the control available by registering it in .NET MAUI.<\/p>\n<pre><code class=\"csharp\">.ConfigureMauiHandlers(handlers =&gt;\r\n{\r\n    handlers.AddHandler(typeof(MapHandlerDemo.Maps.Map),typeof(MapHandler));\r\n})\r\n<\/code><\/pre>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_maps.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40092\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_maps.png\" alt=\"Image maui maps png\" width=\"802\" height=\"520\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_maps.png 802w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_maps-300x195.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_maps-768x498.png 768w\" sizes=\"(max-width: 802px) 100vw, 802px\" \/><\/a><\/p>\n<p>Read more in the .NET MAUI documentation about <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/user-interface\/handlers\/customize\">customizing controls with handlers<\/a><\/p>\n<h2>Modern Developer Productivity<\/h2>\n<p>More than being a technology that <strong>can<\/strong> build anything, we want .NET to also accelerate your productivity using common language features, patterns and practices, and tooling.<\/p>\n<p>.NET MAUI uses the new C# 10 features introduced in .NET 6, including global using statements and file scoped namespaces &#8211; great for reducing clutter and cruft in your files. And .NET MAUI takes multi-targeting to a new level with \u201csingle project\u201d focus.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/code_side_by_side.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40093\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/code_side_by_side.png\" alt=\"Image code side by side png\" width=\"1355\" height=\"549\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/code_side_by_side.png 1355w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/code_side_by_side-300x122.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/code_side_by_side-1024x415.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/code_side_by_side-768x311.png 768w\" sizes=\"(max-width: 1355px) 100vw, 1355px\" \/><\/a><\/p>\n<p>In new .NET MAUI projects, the platforms are nestled away in a subfolder giving focus to your application where you spend the majority of your effort. Within your project\u2019s Resources folder you have a <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/fundamentals\/single-project\">single place<\/a> to manage your app\u2019s <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/user-interface\/fonts\">fonts<\/a>, <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/user-interface\/images\/images\">images<\/a>, <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/user-interface\/images\/app-icons?tabs=android\">app icon<\/a>, <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/user-interface\/images\/splashscreen?tabs=android\">splash screen<\/a>, raw assets, and styling. .NET MAUI will do the work to optimize them for each platform\u2019s unique requirements.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/single_project_solution.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-40124\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/single_project_solution.png\" alt=\"solution explorer showing platform and resources folders\" width=\"536\" height=\"427\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/single_project_solution.png 536w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/single_project_solution-300x239.png 300w\" sizes=\"(max-width: 536px) 100vw, 536px\" \/><\/a><\/p>\n<blockquote><p><strong>Multi-project vs Single project<\/strong> Structuring your solution with Individual projects for each platform is still supported, so you can choose when the single project approach is appropriate for your applications.<\/p><\/blockquote>\n<p>.NET MAUI uses the builder pattern made popular with Microsoft.Extensions libraries in ASP.NET and Blazor applications as a single place to initialize and configure your app. From here, you can provide .NET MAUI with your fonts, tap into platform specific lifecycle events, configure dependencies, enable specific features, enable vendor control toolkits, and more.<\/p>\n<pre><code class=\"csharp\">public static class MauiProgram\r\n{\r\n    public static MauiApp CreateMauiApp()\r\n    {\r\n        var builder = MauiApp.CreateBuilder();\r\n        builder\r\n            .UseMauiApp&lt;App&gt;()\r\n            .ConfigureServices()\r\n            .ConfigureFonts(fonts =&gt;\r\n            {\r\n                fonts.AddFont(\"Segoe-Ui-Bold.ttf\", \"SegoeUiBold\");\r\n                fonts.AddFont(\"Segoe-Ui-Regular.ttf\", \"SegoeUiRegular\");\r\n                fonts.AddFont(\"Segoe-Ui-Semibold.ttf\", \"SegoeUiSemibold\");\r\n                fonts.AddFont(\"Segoe-Ui-Semilight.ttf\", \"SegoeUiSemilight\");\r\n            });\r\n\r\n        return builder.Build();\r\n    }\r\n}\r\n<\/code><\/pre>\n<pre><code class=\"csharp\">public static class ServicesExtensions\r\n{\r\n    public static MauiAppBuilder ConfigureServices(this MauiAppBuilder builder)\r\n    {\r\n        builder.Services.AddMauiBlazorWebView();\r\n        builder.Services.AddSingleton&lt;SubscriptionsService&gt;();\r\n        builder.Services.AddSingleton&lt;ShowsService&gt;();\r\n        builder.Services.AddSingleton&lt;ListenLaterService&gt;();\r\n#if WINDOWS\r\n        builder.Services.TryAddSingleton&lt;SharedMauiLib.INativeAudioService, SharedMauiLib.Platforms.Windows.NativeAudioService&gt;();\r\n#elif ANDROID\r\n        builder.Services.TryAddSingleton&lt;SharedMauiLib.INativeAudioService, SharedMauiLib.Platforms.Android.NativeAudioService&gt;();\r\n#elif MACCATALYST\r\n        builder.Services.TryAddSingleton&lt;SharedMauiLib.INativeAudioService, SharedMauiLib.Platforms.MacCatalyst.NativeAudioService&gt;();\r\n        builder.Services.TryAddSingleton&lt; Platforms.MacCatalyst.ConnectivityService&gt;();\r\n#elif IOS\r\n        builder.Services.TryAddSingleton&lt;SharedMauiLib.INativeAudioService, SharedMauiLib.Platforms.iOS.NativeAudioService&gt;();\r\n#endif\r\n\r\n        builder.Services.TryAddTransient&lt;WifiOptionsService&gt;();\r\n        builder.Services.TryAddSingleton&lt;PlayerService&gt;();\r\n\r\n        builder.Services.AddScoped&lt;ThemeInterop&gt;();\r\n        builder.Services.AddScoped&lt;ClipboardInterop&gt;();\r\n        builder.Services.AddScoped&lt;ListenTogetherHubClient&gt;(_ =&gt;\r\n            new ListenTogetherHubClient(Config.ListenTogetherUrl));\r\n\r\n\r\n        return builder;\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>Read more in the .NET MAUI documentation about <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/fundamentals\/app-startup\">app startup with MauiProgram<\/a> and <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/fundamentals\/single-project\">single project<\/a>.<\/p>\n<h3>Bringing Blazor to Desktop and Mobile<\/h3>\n<p>.NET MAUI is also great for web developers looking to get in on the action with native client apps. .NET MAUI integrates with <a href=\"https:\/\/blazor.net\">Blazor<\/a>, so you can reuse existing Blazor web UI components directly in native mobile and desktop apps. With .NET MAUI and Blazor, you can reuse your web development skills to build cross-platform native client apps, and build a single UI that spans mobile, desktop, and web.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_blazor_mobile_desktop_web.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40095\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_blazor_mobile_desktop_web.png\" alt=\".NET MAUI Blazor on mobile, desktop, and web\" width=\"1403\" height=\"1030\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_blazor_mobile_desktop_web.png 1403w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_blazor_mobile_desktop_web-300x220.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_blazor_mobile_desktop_web-1024x752.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_blazor_mobile_desktop_web-768x564.png 768w\" sizes=\"(max-width: 1403px) 100vw, 1403px\" \/><\/a><\/p>\n<p>.NET MAUI executes your Blazor components natively on the device (no WebAssembly needed) and renders them to an embedded web view control. Because your Blazor components compile and execute in the .NET process, they aren\u2019t limited to the web platform and can leverage any native platform feature, like notifications, Bluetooth, geo-location and sensors, filesystem, and so much more. You can even add native UI controls alongside your Blazor web UI. This is an all new kind of hybrid app: Blazor Hybrid!<\/p>\n<p>Getting started with .NET MAUI and Blazor is easy: just use the included .NET MAUI Blazor App project template.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_blazor_template.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40116\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_blazor_template.png\" alt=\".NET MAUI Blazor app template\" width=\"547\" height=\"352\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_blazor_template.png 547w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_blazor_template-300x193.png 300w\" sizes=\"(max-width: 547px) 100vw, 547px\" \/><\/a><\/p>\n<p>This template is all setup so you can start building a .NET MAUI Blazor app using HTML, CSS, and C#. The <a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/hybrid\/tutorials\/maui\">Blazor Hybrid tutorial for .NET MAUI<\/a> will walk you through building and running your first .NET MAUI Blazor app.<\/p>\n<p>Or <a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\/user-interface\/controls\/blazorwebview#add-a-blazorwebview-to-an-existing-app\">add a <code>BlazorWebView<\/code> control to an existing .NET MAUI app<\/a> wherever you want to start using Blazor components:<\/p>\n<pre><code class=\"xaml\">&lt;BlazorWebView HostPage=\"wwwroot\/index.html\"&gt;\r\n    &lt;BlazorWebView.RootComponents&gt;\r\n        &lt;RootComponent Selector=\"#app\" ComponentType=\"{x:Type my:Counter}\" \/&gt;\r\n    &lt;\/BlazorWebView.RootComponents&gt;\r\n&lt;\/BlazorWebView&gt;\r\n<\/code><\/pre>\n<p>Blazor Hybrid support is also now available for WPF and Windows Forms so you can start modernizing your existing desktop apps to run on the web or to run cross platform with .NET MAUI. The <code>BlazorWebView<\/code> controls for WPF and Windows Forms are available on NuGet. Check out the Blazor Hybrid tutorials for <a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/hybrid\/tutorials\/wpf\">WPF<\/a> and <a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/hybrid\/tutorials\/windows-forms\">Windows Forms<\/a> to learn how to get started.<\/p>\n<p>To learn more about Blazor Hybrid support for .NET MAUI, WPF, and Windows forms, check out the <a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/hybrid\">Blazor Hybrid docs<\/a>.<\/p>\n<h2>Optimized for Speed<\/h2>\n<p>.NET MAUI is designed for performance. You have told us how critical it is for your applications to start as quickly as possible, especially on Android. The UI controls in .NET MAUI implement a thin, decoupled handler-mapper pattern over the native platform controls. This reduces the number of layers in the rendering of UI and simplifies control customization.<\/p>\n<p>The layouts in .NET MAUI have been architected to use a consistent manager pattern that optimizes the measure and arrange loops to more quickly render and update your UI. We have also surfaced layouts pre-optimized for specific scenarios such as <code>HorizontalStackLayout<\/code> and <code>VerticalStackLayout<\/code> in addition to <code>StackLayout<\/code>.<\/p>\n<p>From the very beginning of this journey, we set a goal to improve startup performance and maintain or reduce app size as we transitioned to .NET 6. At the time of GA, we\u2019ve achieved a 34.9% improvement for .NET MAUI and 39.4% improvement in .NET for Android. Those gains extend to complex apps as well; the <a href=\"https:\/\/github.com\/microsoft\/dotnet-podcasts\">.NET Podcast sample application<\/a> began with a startup of 1299ms and at GA measures 814.2ms, a 37.3% improvement since Preview 13.<\/p>\n<p>The settings are enabled by default to provide a release build with these optimizations.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/android_release_settings.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40111\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/android_release_settings.png\" alt=\"Image android release settings\" width=\"858\" height=\"670\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/android_release_settings.png 858w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/android_release_settings-300x234.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/android_release_settings-768x600.png 768w\" sizes=\"(max-width: 858px) 100vw, 858px\" \/><\/a><\/p>\n<p>Stay tuned for a deep-dive blog post on what we have done to achieve these results.<\/p>\n<h2>Get Started Today<\/h2>\n<p>To get started using .NET MAUI on Windows, <a href=\"https:\/\/aka.ms\/vs2022preview\">install or update Visual Studio 2022 Preview<\/a> to version 17.3 Preview 1.1. In the installer, choose the workload \u201c.NET Multi-platform App UI development\u201d.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_workload.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-39813\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_workload.png\" alt=\"dot net maui workload in visual studio installer\" width=\"1019\" height=\"587\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_workload.png 1019w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_workload-300x173.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2022\/05\/maui_workload-768x442.png 768w\" sizes=\"(max-width: 1019px) 100vw, 1019px\" \/><\/a><\/p>\n<p>To use .NET MAUI on Mac, <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/mac\/preview\/\">install the new Visual Studio 2022<\/a> preview for Mac (17.3 Preview 1).<\/p>\n<p>Visual Studio 2022 will GA .NET MAUI tooling support later this year. On Windows today you can accelerate your dev loop with XAML and .NET Hot Reload, and powerful editors for XAML, C#, Razor, and CSS among others. Using the XAML Live Preview and Live Visual Tree, you can preview, align, inspect your UI, and edit it while debugging. .NET MAUI\u2019s new single project experience now includes project property pages for a visual editing experience to configure your apps with multi-platform targeting.<\/p>\n<p>On Mac, you can today load single project and multi-project .NET MAUI solutions to debug with a beautiful, new native Visual Studio 2022 for Mac experience. Other features for enhancing your productivity developing .NET MAUI applications will ship in subsequent previews.<\/p>\n<p>We recommend getting started updating your libraries to .NET MAUI and creating new .NET MAUI projects today. Before diving headlong into converting Xamarin projects to .NET MAUI, review your dependencies, the state of Visual Studio support for .NET MAUI, and the published known issues to identify the right time to transition. Keep in mind that Xamarin will continue to be supported under the <a href=\"https:\/\/dotnet.microsoft.com\/platform\/support\/policy\/xamarin\">modern lifecycle policy<\/a>, which states 2 years from the last major release.<\/p>\n<h3>Resources<\/h3>\n<ul>\n<li><a href=\"https:\/\/github.com\/dotnet-presentations\/dotnet-maui-workshop\">.NET MAUI &#8211; Workshop<\/a><\/li>\n<li><a href=\"https:\/\/dotnet.microsoft.com\/learn\/maui\/first-app-tutorial\/intro\">Building your first .NET MAUI app<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/dotnet\/maui\">Documentation<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/maui\/wiki\/Known-Issues\">Known Issues<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/learn\/paths\/build-apps-with-dotnet-maui\/\">Microsoft Learn Path<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/answers\/topics\/dotnet-maui.html\">Q&amp;A Forums<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/maui\/releases\/tag\/6.0.312\">Release Notes<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/maui-samples\">Samples<\/a><\/li>\n<li><a href=\"https:\/\/dotnet.microsoft.com\/platform\/support\/policy\/maui\">Support Policy &#8211; .NET MAUI<\/a><\/li>\n<li><a href=\"https:\/\/dotnet.microsoft.com\/platform\/support\/policy\/xamarin\">Support Policy &#8211; Xamarin<\/a><\/li>\n<\/ul>\n<h3>We need your feedback<\/h3>\n<p>We\u2019d love to hear from you! As you encounter any issues, file a report on GitHub at <a href=\"https:\/\/github.com\/dotnet\/maui\/issues\/new\/choose\">dotnet\/maui<\/a>.<\/p>\n<h2>Summary<\/h2>\n<p>With <a href=\"https:\/\/dot.net\/maui\">.NET MAUI<\/a>, you can build native applications for Android, iOS, macOS, Tizen, and Windows from a single codebase using the same productivity patterns practiced all across .NET. The thin and decoupled UI and layout architecture of .NET MAUI together with single project features enable you to stay focused on one application instead of juggling the unique needs of multiple platforms. And with .NET 6, we\u2019re shipping performance improvements not only for Android, but all across the breadth of platform targets.<\/p>\n<p>Less platform code, more shared code, consistent standards and patterns, lightweight and performant architecture, mobile and desktop native experiences &#8211; this is just the beginning. We look forward to seeing libraries and the broader ecosystem come alongside .NET MAUI in the following months to define a new era of cross-platform application development for .NET developers that empowers you and your organization to achieve more.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to .NET Multi-platform App UI. This release marks a new milestone in our multi-year journey to unify the .NET platform. Now you and over 5 million other .NET developers have a first-class, cross-platform UI stack targeting Android, iOS, macOS, and Windows to complement the .NET toolchain (SDK) and base class library (BCL). You can [&hellip;]<\/p>\n","protected":false},"author":553,"featured_media":40089,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,7233],"tags":[7238,117],"class_list":["post-40109","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-maui","tag-net-maui","tag-releases"],"acf":[],"blog_post_summary":"<p>Welcome to .NET Multi-platform App UI. This release marks a new milestone in our multi-year journey to unify the .NET platform. Now you and over 5 million other .NET developers have a first-class, cross-platform UI stack targeting Android, iOS, macOS, and Windows to complement the .NET toolchain (SDK) and base class library (BCL). You can [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/40109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/553"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=40109"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/40109\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/40089"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=40109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=40109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=40109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}