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
7
votes
1 answer

Navigate to page on start in .NET Maui app

Seems like a simple question, but I haven't been able to find a simple answer. Essentially I want to choose which page in the app to start on based on some stored state. I added a GoToAsync call in the AppShell constructor, but this didn't…
Ryan
  • 123
  • 1
  • 9
7
votes
1 answer

How to include existing C++ libraries per platform in MAUI project?

We have a C++ library that is built per platform i.e. .dll for Windows, .so for Android & .a for iOS. Tried the following to include the .so file in MAUI app for Android. (Other platforms are pending) - Platforms -> Android -> lib -> arm64-v8a…
nihar
  • 93
  • 6
7
votes
2 answers

How to hide default switch "on/off" text in Maui?

I have a switch control in .Net Maui : By default it shows a label "on/off" based on it's state. I want it to show nothing. Is there any way to hide/remove it?
Thomas Carlton
  • 5,344
  • 10
  • 63
  • 126
7
votes
3 answers

An item with the same key has already been added MAUI C#

When I try to run my program in release mode, it give this error: Severity Code Description Project File Line Suppression State Error XAGJS7004 System.ArgumentException: An item with the same key has already been added. at…
emilim
  • 109
  • 7
7
votes
1 answer

How To Fix Resource Error from Android Manifest

I have a problem when using RC1 of MAUI that caused me to remove this part from the Android manifest: Now…
Steve Peschka
  • 1,015
  • 11
  • 25
7
votes
1 answer

How to present data with binding and DataTemplate -or- ContentControl for MAUI

How to present a string, number or a also view model with binding and DataTemplate? I am looking for a MAUI replacement for the WPF ContentControl. The ContentView has a Content property but this is from type View. The ContentPresenter has a Content…
Kux
  • 1,362
  • 1
  • 16
  • 31
7
votes
1 answer

Can I use existing WinUI3 controls in MAUI project?

Is it possible to use the exisiting controls of WinUI 3 in the MAUI project? Like controls in https://github.com/microsoft/WinUI-Gallery I installed the WinUI package to my MAUI project
Fruio Nik
  • 71
  • 5
7
votes
4 answers

How to open WinUI Maui through URI Activation?

I've created a Maui windows application. I'm looking to activate the application through a URI and pass query parameters to the app. I've added the windows protocol for calling the app via uri in the package manifest:
7
votes
1 answer

.NET Maui MVVM Picker Binding SelectedIndexChanged Event

I am developing a Windows desktop app with .NET Maui using MVVM. I have 2 Pickers with ImageSource and SelectedIndex bound to properties in a viewmodel. When an item is selected from the first Picker the items in the other need to be changed. I…
jbdev
  • 373
  • 2
  • 15
7
votes
1 answer

Maui Android Can't Load From Bundle

I have a Maui Android app that has been working, and all of a sudden has decided to crash out during start up. Looking at the output window log it appears to be unable to extract dlls form the bundle. I have include log from the output window, maybe…
Terry151151
  • 631
  • 1
  • 8
  • 15
7
votes
3 answers

Create and use HttpClient in a .NET MAUI app

Do we create/use an HttpClient in a .NET MAUI app, the same way we do, say, in a web or API app? Specifically, I add my HttpClient's to my app in Program.cs using IHttpFactory -- see below: builder.Services.AddHttpClient("NamedClient1", config => { …
Sam
  • 26,817
  • 58
  • 206
  • 383
7
votes
2 answers

Shell navigation in .NET MAUI to a page with Bottom Tabs

During a login flow, the login page does not normally have bottom tabs which constitute the main flow of the app. AppShell.xaml
Tanaka Mawere
  • 683
  • 1
  • 9
  • 22
7
votes
3 answers

Capture KeyDown or KeyPress in .NET MAUI (Windows)

I am working on a barcode reader app for Android and Windows. On Android, I receive a system broadcast for every barcode scanned, but on Windows the typical configuration is a keyboard entry sent from the barcode scanner. So what I am trying to do…
Joerg
  • 177
  • 2
  • 11
7
votes
3 answers

Using serilog with .NET MAUI

I have a very simple .NET MAUI app (not a Blazor one). I've installed Seriolog and Serilog.Extensions.Logging (so I can use AppCenter). I have the following in my startup code to initialise Serilog public static MauiApp CreateMauiApp() { // set…
Nodoid
  • 1,449
  • 3
  • 24
  • 42
7
votes
3 answers

.net maui windows titlebar

I was experimenting with the new .net maui preview 13 and I created a new app, but for some reason the title bar on windows is looking weird As you can see the the title bar is grey (not white) and it is thicker than normal (normally it is as thick…
Ahmed Fawzy
  • 309
  • 2
  • 8