Questions tagged [maui]

.NET Multi-platform App UI (MAUI) lets you build native apps using a .NET cross-platform UI toolkit that targets the mobile and desktop form factors on Android, iOS, macOS, Windows, and Tizen. .NET MAUI is the successor of Xamarin.Forms and is now part of the .NET ecosystem, rather than a separate library.

.NET Multi-platform App UI (MAUI)

.NET MAUI is:

  • Multi-platform native UI
  • Deploy to multiple devices across mobile & desktop on Android, iOS, macOS, Windows and Tizen.
  • Using a single project, single codebase
  • Evolution of Xamarin.Forms

Goals

  • Improve app performance
  • Improve simplicity of control extensibility
  • Improve simplicity of contributing
  • Enable developer options to use Model-View-Update (MVU) and Blazor

Xamarin.Forms vs .NET MAUI

Xamarin.Forms .NET MAUI
Platforms
Android API 19+ API 21+
iOS 9-15 10+
Linux Community Community
macOS Community Microsoft
Tizen Samsung Samsung
Windows UWP Microsoft
WPF Community
Microsoft
Features
Renderers Tightly coupled to BindableObject Loosely coupled, no Xamarin.Forms dependencies
App Models MVVM MVVM
RxUI RxUI
MVU *
Blazor *
Single Project No Yes
Multi-targeting No Yes
Multi-window No Yes
Misc
.NET Xamarin.iOS, Xamarin.Android, Mono, .NET Framework, ... .NET 6+
XAML Hot Reload Experimental: SDK 4.x & Visual Studio 2019 prior to version 16.9
Feature Complete: SDK 5.x & Visual Studio 2019 version 16.9 or newer
Yes
.NET Hot Reload iOS/Android – No
UWP – Limited support for runtime edits using .NET “Edit & Continue”
Yes
Acquisition NuGet & Visual Studio Installer dotnet
Project System Franken-proj SDK Style
dotnet CLI No Yes
Tools
Visual Studio 2019 Yes Yes
Visual Studio 2019 for Mac Yes Yes
Visual Studio Code No Experimental**

* These app models are experimental.

** Visual Studio Code will work by virtue of .NET unification, however not all experiences that make .NET MAUI development delightful (intellisense for example) may be enabled at the time of .NET 6 release.

FAQs

Do you have questions? Do not worry, we have prepared a complete FAQ answering the most common questions.

How to Engage, Contribute, and Give Feedback

Some of the best ways to contribute are to try things out, file issues, join in design conversations, and make pull-requests. Proposals for changes specific to MAUI can be found too.

4576 questions
37
votes
4 answers

What is MAUI? and what are differences between MAUI and Xamarin

So, What happens to Xamarin.Forms? What is Multi-platform App UI? What is differences between MAUI and Xamarin Where can we generate MAUI projects?
Anas Alweish
  • 2,818
  • 4
  • 30
  • 44
32
votes
12 answers

New .Net MAUI App project throws 'The name 'InitializeComponent' does not exist in the current context' build errors

I've attempted to start playing with .Net MAUI and I've setup my development environment following the steps as described…
mnemonic
  • 692
  • 1
  • 9
  • 18
30
votes
1 answer

How can I remove the platforms I do not need to compile for in .net MAUI?

I only want to make a project for MacOS and Windows, no need for Android or iOS. I tried deleting the platforms from the folder called "Platforms" but they seem to regenerate each compile. Is there an official method for only targeting the platforms…
DaWiseguy
  • 786
  • 7
  • 16
29
votes
2 answers

How to create a background service in .NET Maui

I'm new to mobile app development and am learning .NET Maui. The app I'm creating needs to listen for Accelerometer events, and send a notification to a web service if the events meet certain criteria. The bit I'm struggling with is how to have the…
Netricity
  • 2,550
  • 1
  • 22
  • 28
29
votes
4 answers

What is the difference between MAUI and Uno Platform?

I'm a little confused. Can anyone explain exactly what the difference is between the two? When should we use MAUI and when UNO? As I realized, both can run on different platforms, so what is the reason for introducing two different technologies at…
git test
  • 408
  • 1
  • 5
  • 11
28
votes
2 answers

Why do Switch and ListView controls in MAUI not update with 2-way binding?

This question is about two MAUI controls (Switch and ListView) - I'm asking about them both in the same question as I'm expecting the root cause of the problem to be the same for both controls. It's entirely possible that they're different problems…
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
24
votes
7 answers

MAUI .NET Set Window Size

How can I set the window size in MAUI? Background info: I only care about Windows for this application - I chose MAUI so I could use Blazor for a desktop application. For some reason the default window size is massive (takes up almost all of my…
Sellorio
  • 1,806
  • 1
  • 16
  • 32
20
votes
3 answers

VS 2022 Preview not showing the XAML designer

I've just installed VS 2022 preview to use Maui but there seems no way to see a designer view of the XAML, I want to drag and drop controls onto the page but all I get is an ancient looking XAML text view.
Paul
  • 319
  • 1
  • 2
  • 3
19
votes
3 answers

How to DisplayAlert in a .NET MAUI ViewModel

I went through the "Build mobile and desktop apps with .NET MAUI" path on Microsoft Learn. Now that I have a simple working MAUI app, I'm trying to make it MVVM using CommunityToolkit.MVVM. The course has a click event for called OnCall which looks…
master_ruko
  • 629
  • 1
  • 4
  • 22
19
votes
4 answers

Java SDK 11.0 or above is required when using .NET 6 or higher

I've installed .NET 6 (version 6.0.100-rc.1.21458.32) and Visual Studio 2020 Preview (although it might be not a prerequisite). I am trying to debug a hello-world application but I am getting a build error regarding Java. C:\Program…
Themelis
  • 4,048
  • 2
  • 21
  • 45
18
votes
6 answers

MAUI how to remove the Title Bar and fix the window size?

How can I remove the Title Bar in MAUI and fix the window size as 800x400 pixels in the Windows version of the application? full size I searched for a very long time in the Internet, but I found already not actual information for later versions of…
17
votes
1 answer

Get Android CurrentActivity in .Net MAUI

I'm porting a Xamarin.Android project to .Net 6. Because of dependencies, it's not possible to include Xamarin.Essentials in the .Net 6 project. So I'm switching everything to use the Microsoft.* namespaces. This was easy enough, except for…
Saqib
  • 7,242
  • 7
  • 41
  • 55
15
votes
2 answers

Injecting services into view models in .NET MAUI app

I'm trying to understand how to implement dependecy injection in a .NET MAUI app. I have a service class -- and its interface -- that handle my REST calls that looks like this: public class MyRestApiService : IMyRestApiService { public async…
Sam
  • 26,817
  • 58
  • 206
  • 383
15
votes
2 answers

Is there a dialog for saving files in .NET MAUI?

.NET MAUI provides a FilePicker to show a native Dialog where you can pick a file from the device. Is there a way to show a dialog for saving files? (where you can select a path and enter an filename, ...). I didn't find anything in the .NET MAUI…
Daniel
  • 243
  • 3
  • 8
14
votes
3 answers

JS/.NET interact on MAUI WebView

I am migrating our app from Xamarin to MAUI, and I am a bit struggling with migrating the code that handles JS/.NET interactions in a WebView on both Android and iOS. Let's focus on Android. It's especially about calling .NET code from JS in the…
Danny
  • 411
  • 1
  • 3
  • 8
1
2 3
99 100