Announcing .NET MAUI Preview 11

David Ortinau

Today we are pleased to share .NET Multi-platform App UI (MAUI) Preview 11. In this release we have added the first batch of Fluent UI control styling, multi-window implementations, control features, and another set of iOS type alignment. These ongoing .NET MAUI previews run on the latest preview of .NET 6 and are available with the new Visual Studio 2022 17.1 Preview 2 on Windows shipping today. We are on track to ship a release candidate in Q1 2022, and final release in Q2 2022.

The source for the .NET Podcast app showcased at .NET Conf 2021 has been published, and includes Blazor, .NET MAUI, and .NET MAUI Blazor Hybrid apps.

Let’s take a deeper look at the highlights in preview 11.

Windows Control Styling with the Fluent Design System

.NET MAUI provides platform-specific design and experience by default, so your apps get the right look and feel for each platform from a single code base without any additional effort. Windows 11 introduces new UI styling with the updated Fluent Design System, and .NET MAUI styles all controls to use the latest. Subsequent previews will build upon this, adding more controls and support for themes. In Preview 11 you will see initial updates to:

side by side of button and entry styling

Multi-window Apps

One of the major updates to .NET MAUI compared to Xamarin.Forms is introducing multiple windows. Application.Current.Windows holds references to all windows you have created. To open a new window, it’s as simple as:

var secondWindow = new Window {
    Page = new MySecondPage {
        // ...
    }
};

Application.Current.OpenWindow(secondWindow);

multiple windows for Weather app on macOS

To try this today targeting macOS and iPadOS, add a SceneDelegate to each respective platform folder and update your info.plist to enable scenes.

Did you know? This image is an iPad simulator running on Windows using the Remoted iOS Simulator available when you connect to a Mac build host. Alternatively, you can debug any .NET MAUI app on a device running iPadOS (or iOS) directly from Visual Studio 2022 on Windows using Hot Restart.

The Windows App SDK implementation of multi-window will be in an experimental release until release in v1.1 (see roadmap).

Templates and C# 10

Simplification is one of the main goals of .NET MAUI, to make it easier for everyone to build great apps. Going from multiple projects per platform to a single project is just one example of how we are doing that. In this release we have updated the templates using C# 10 patterns such as implicit usings and file-scoped namespaces, and added item templates for ContentPage and ContentView. Now when your project opts-in to using ImplicitUsings you’ll see a cleaner project file like our template’s MauiProgram.cs.

namespace Preview11;

public static class MauiProgram
{
    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();
        builder
            .UseMauiApp<App>()
            .ConfigureFonts(fonts =>
            {
                fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
            });

        return builder.Build();
    }
}

So, where did all the using statements go? We use implicit global usings to gather them dynamically so you don’t need to worry about it.

iOS, macOS, and tvOS Type Alignment

As part of unifying Xamarin SDKs with .NET 6, we have been working through updating our Apple related SDKs to use the native nint and nuint types in .NET 6 rather than System.nint and System.nuint. This impacts existing libraries built for iOS, macOS, and tvOS using .NET 6. To adopt this change you must recompile your code against .NET 6, and if you explicitly use the types above you should update your .NET 6 code to use the C# types.

Read the issue for this change on GitHub for more details.

New .NET MAUI Documentation

We have published a new batch of documentation for .NET MAUI including new guides for Accessibility, BlazorWebView, Border, GraphicsView, Maui.Graphics, Shadows, Splash Screen, multi-targeting, and how you can invoke platform code. Xamarin.Forms documentation is in the process of being ported and updated to .NET MAUI, and we’ll be publishing regularly from here on out. Anytime you cannot find the .NET MAUI documentation you need, check to see if there’s a Xamarin.Forms doc available since most of the concepts all apply to .NET MAUI as well.

Get Started Today

Before installing Visual Studio 2022 Preview, we highly recommend starting from a clean slate by uninstalling all .NET 6 previews and Visual Studio 2022 previews.

Now, install Visual Studio 2022 Preview (17.1 Preview 2) and confirm .NET MAUI (preview) is checked under the “Mobile Development with .NET workload”. If you already have 17.1 installed, then you can just perform an update from the Visual Studio installer.

Ready? Open Visual Studio 2022 and create a new project. Search for and select .NET MAUI.

Preview 11 release notes are on GitHub and we have captured the top changes in a migration guide in the wiki. For additional information about getting started with .NET MAUI, refer to our documentation.

Feedback Welcome

Please let us know about your experiences using .NET MAUI to create new applications by engaging with us on GitHub at dotnet/maui.

For a look at what is coming in future releases, visit our product roadmap, and for a status of feature completeness visit our status wiki.

31 comments

Discussion is closed. Login to edit/delete existing comments.

  • Damian Wyka 0

    For me multi-windowing is very exciting! However i cant find at least api documentation based on links here and on github. I wanted to check if this preview supports drag&drop (wanted to implement something like dock manager in visual studio, ideally with ability to preview dragged window but this particular feature is not necessary). If it is not supported scenario will it be for final release?

      • Damian Wyka 0

        I need drag&drop on desktop this link talks about mobile mostly. Also i know that i will need to implement myself just wanted to know if there will be building blocks for it like drag drop on desktop with ability to work with multiple windows within SINGLE application. Emphasis necessary because many frameworks dont work well when dragging and dropping between windows in single application when these windows are partially stacked on top of each other (as an example, there are few other edge cases too).

        So will be there drag drop on desktop that works properly with multiwindow in single application?

      • Doug 0

        I’m trying to get a simple multi-window app running and I’m probably missing something. I’m using VS 2022 Preview 17.1 Preview 4 and from your notes on the MAUI .NET Blog “The Windows App SDK implementation of multi-window will be in an experimental release until release in v1.1 (see roadmap).” But, the guidance for the experimental SDK says “Visual Studio 2022 version 17.1 (Preview) only supports the latest 1.0 Preview 3 release. To use the experimental release, install Visual Studio 2022 version 17.0 or Visual Studio 2019.”

  • Tony Henrique 0

    Very cool!

  • Parminder Singh 0

    Hi, I want to develop a new multiple platform application and also want to utilize my web development skills(HTML/CSS) in that, So It looks MAUI is the best option in DotNet.
    But because currently, it is in preview So Is it safe to start a production project in MAUI?
    Is there any chance exists that Microsoft will not release its official version in the future?

    I need to start the project as soon as possible, that is why I want to know the best option available in the DotNet for multiplatform application.

    • udaya kumar laligondla 0

      Hi, I am also in the same situation. The next best choice for me right now is Flutter, It has steep learning curve.

      • David OrtinauMicrosoft employee 0

        “We are on track to ship a release candidate in Q1 2022, and final release in Q2 2022.”

        If your project is primarily being developed on Windows today, your production schedule doesn’t have you shipping until we GA in Q2 2022, and the features you need are available when you need them, then I would start with .NET MAUI today for that project.

        Parminder, it sounds like you’re wanting to use Blazor to leverage html/css, so you have everything you need now for that.

        If your project needs to ship quicker and you’re targeting primarily mobile platforms, then Xamarin.Forms is the best option and you can upgrade it to .NET MAUI later. This doesn’t require an app rewrite.

        • Parminder Singh 0

          Thank you for your response, can you please confirm one more thing about the MAUI release? Actually, we are a little worried here that if due to any reason if MAUI could not be released in Q2 2022 then will it be possible to publish our desktop and android apps on Microsoft and google stores developed with MAUI preview?

  • Sturla 0

    When can we expect Maui Tizen support? Or where would be the best place to monitor that progress?

  • Christoph Fink 0

    Using Visual Studio 2022 17.1 Preview 2 I can connect to my Mac running the newest XCode, but when trying to compile the default template for iOS I get the following error:

    Automatic Provisioning is enabled but no Development Team was selected. Please select a team or switch to Manual Provisioning from the iOS Bundle Signing page.

    How can I configure this for a .NET MAUI project?

    • Christoph Fink 0

      I found a solution by using Hot Restart – that dialog adds the entries in question to the project. For Reference, the following entries are needed in the first PropertyGroup:

      <CodesignKey>Apple Development: YOUR NAME</CodesignKey>
      <CodesignProvision>VS: com.COMPANY.APPID Development</CodesignProvision>

      You can copy these value from an old Xamarin.iOS project.

      • David OrtinauMicrosoft employee 0

        Yes, the UI for managing these project properties will come in a future VS release. Until then, editing the csproj is the solution.

  • Guy 0

    “latest preview of .NET 6”

    Do you mean the “latest ‘release’ of .NET 6”?

    AFAIK .NET 6 is released there are no previews? Might be confusing, one might think they need a preview version of .NET similar to having the preview version of MAUI.

    • Christoph Fink 0

      Visual Studio 2022 17.1 Preview 2 installs .NET 6.0.200-preview.21617.4 – that version is not on the download page yet…

      • Guy 0

        Thank you, I was confused seeing preview with .NET 6 when it is released version.

  • Rod Macdonald 0

    2 things:
    is there a link to any updated documentation for including a BlazorWebView control in a WinForms app?
    aside from HTML, is it naive to think Microsoft could produce a common UI library between Windows and web MAUI apps in a similar fashion to Flutter, which I think uses Skia?

    • David OrtinauMicrosoft employee 0

      There will be BlazorWebView in WinForms documentation published in the Blazor docs, not .NET MAUI. It’s on the way.

      Re: a common UI lib that achieves all of that from a single codebase, today you can look at the Uno Platform.

      We hear mostly from customers that they want native UI on each platform, which means web uses web tech, mobile uses mobile, and desktop .etc. and then specific controls/experiences leverage solutions like Skia when you need that customization. So we primarily invest in supporting that approach.

      We do have the Microsoft.Maui.Graphics.Controls experiment which uses platform graphics engines to render UI, and this can work on the web as well. It provides SkiaSharp as an option. This combined with .NET MAUI would provide very close to what it sounds like you’re describing, so if you would like to see that please give that a look and provide feedback.

      • Rod Macdonald 0

        Thank you David for reaching out. Microsoft.Maui.Graphics.Controls sounds exactly what I would say is a very big deal indeed. This with a design surface has to be the icing on top of the VS and .NET cake. Perhaps one day we could even draw assets in things like CorelDraw or Illustrator and then add the code behind. It would be simply awesome.

        How can I provide feedback?

        PS in trying to create a MAUI Blazor project, I seem to be missing some WinUI dependancies in the 2nd (.WinUI) project. If anyone could share some light on that, that’d be great. Thank you.

      • Marek Havrila 0

        David, if I may ask, why not offer both ways (native UI and custom(e.g. skia)UI)? Is it because there is no time/budget or its more of technical problem? You said its because customers want mostly nativeUI but I am sure all devs can see that flutter is getting more and more popular so that means many customers want rendered UI as well.

        My point here is that if you will offer more UI options, then MAUI will be golden and no-brainer to pick it over any other framework/tool.

        I really hope that Microsoft will decide to provides more resources for graphics.controls(skia), mobile blazor bindings and Linux support. Get those to the production ready state (+faster WASM) and you won.

        Thanks.

      • Plamen Ivanov 0

        David,

        I agree – probably there are customers (developers?) wanting native UI on each platform. But there are also developers wanting XF/MAUI supported on the web. For us third-party Uno is a no-go – even we use their XF renderers it probably will not be the fastest approach and rewriting XF XAML to UWP XAML is not a serious option as MAUI XAML is successor in this case.

        Why would you press us to write desktop apps in pure web tech (HTML/JS with Blazor) only to have single code base? Remember XF Platform Support (you are the last editor!) – even there technology like Ooui is mentioned for the web.

        What was changed so you turn back to community and do not want to hear us? Shall we separately start to support developing/funding Ooui?

        Plamen

  • Larry Feldman 0

    When will Visual Studio Mac be available to support .NET Maui? Thanks.

  • John 0

    Hi David,
    Good news that you are on track to ship a release candidate in Q1 2022, can you pinpoint when the https://github.com/dotnet/maui/wiki/status will be feature complete? I am specifically referring to Label.FormattedText. Looking at the .NET Maui code it doesn’t appear to have started on any platform yet.

    Preview 12 would be great. 😉

    Thanks
    John

  • Paul Graham 0

    Currently, I can’t get the workload to work in Visual Studio, my Maui project is just a class library. Trying to manually install

    dotnet workload install maui
    Failed to update the advertising manifest microsoft.net.workload.mono.toolchain: microsoft.net.workload.mono.toolchain.manifest-6.0.200 is not found in NuGet feeds https://api.nuget.org/v3/index.json, https://aka.ms/maui-preview/index.json, C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\”..

    maui-check also throws errors and can’t install the same ver 6.0.2 packages.

    .NET SDK – Workloads (6.0.100) Checkup…
    x android-aot (Microsoft.NET.Sdk.Android.Manifest-6.0.100 : 31.0.101-preview.10.59) not installed.
    x ios (Microsoft.NET.Sdk.iOS.Manifest-6.0.100 : 15.0.101-preview.10.251) not installed.
    x maccatalyst (Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.100 : 15.0.101-preview.10.251) not installed.
    x tvos (Microsoft.NET.Sdk.tvOS.Manifest-6.0.100 : 15.0.101-preview.10.251) not installed.
    x macos (Microsoft.NET.Sdk.macOS.Manifest-6.0.100 : 12.0.101-preview.10.251) not installed.
    x maui (Microsoft.NET.Sdk.Maui.Manifest-6.0.100 : 6.0.101-preview.10.2068) not installed.
    x wasm-tools (microsoft.net.workload.mono.toolchain.manifest-6.0.100 : 6.0.0) not installed.

Feedback usabilla icon