Microsoft Q&A

.NET MAUI

1,064 questions

A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.

Browse all .NET tags

350 questions with .NET MAUI tags

Sort by: Updated
2 answers One of the answers was accepted by the question author.

Does .NET MAUI support WPF?

As we know we can create UWP applications in MAUI, Please let me know can we create WPF applications In .net MAUI, If there is any possibility please let us know what is the approach for that. [Goal clarification edited in from comment --RC] We…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,274 questions
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
469 questions
asked 2022-05-16T09:58:08.377+00:00
Devi Prasad 86 Reputation points
commented 2023-03-23T08:35:23.2866667+00:00
Alex Rus 0 Reputation points
1 answer One of the answers was accepted by the question author.

.NET Maui How to convert a byte array image to a .NET maui image

Hi There seems to be some difference between the System.Drawing.Image and the Microsoft.Maui.Controls.Image, and I have failed implementing any of the solutions found online. I have a test page created with this Xaml code: <?xml…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-03-21T11:21:53.2733333+00:00
Peter Karlström 21 Reputation points
accepted 2023-03-23T07:24:49.0333333+00:00
Peter Karlström 21 Reputation points
2 answers One of the answers was accepted by the question author.

.net Maui, viewModel alternative to OnAppearing

I notice that in .net MAUI OnAppearing doesn;t work. I need to find a way to open up a "DisplayAlert" as soon as the app appears and it must be triggered from the ViewModel. Thank you in advanced.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-03-03T19:42:54.74+00:00
Heinz Deubler 171 Reputation points
edited an answer 2023-03-21T15:50:43.68+00:00
Max Borrmann 0 Reputation points
1 answer One of the answers was accepted by the question author.

Is the conditional compilation option changed in VS 2022 17.5.2?

I used conditional compilation in my last project and it worked very well. Today I try to use it too, but the compiler doesn't recognise my condition that I added under Properties -> Build-> General For example, if I want to use my MAUI input as…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,761 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,523 questions
asked 2023-03-16T16:11:47.82+00:00
perfect code 271 Reputation points
edited a comment 2023-03-21T13:09:50.1833333+00:00
perfect code 271 Reputation points
1 answer One of the answers was accepted by the question author.

Move to .NET 7 from NET 6

Hi, I used Microsoft Visual Studio Professional 2022 (64-bit) - Current Version 17.4.2. do i need to update VS ? 1.Does .NET 7 is stable and no change are going to be done ? 2.What I need to do in order to pass Maui project from .NET 6 to NET 7…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-03-19T15:12:21.5933333+00:00
דניאל שטרית 331 Reputation points
accepted 2023-03-20T12:16:59.79+00:00
דניאל שטרית 331 Reputation points
1 answer One of the answers was accepted by the question author.

Maui android combined formatted text and regular text

Hello all. do I can combine formatted text and regular text in the same label. or do I can set a formatted text label and a regular text label to a label something like this: l1.text = l2.text + l3.formattedstring. (this only to explain what I want to…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-03-17T08:14:14.7433333+00:00
Haviv Elbsz 666 Reputation points
accepted 2023-03-20T05:38:02.45+00:00
Haviv Elbsz 666 Reputation points
1 answer One of the answers was accepted by the question author.

using FileSystem.OpenAppPackageFileAsyn to open and play mp3 files stored on Google Drive

Hi I am using VS 2022 and C# to develop a MAUI App which needs to be deployed for IOS/Android and Windows. I would like to play audio files that are stored on Google Drive using audioPlayer. Can I use FileSystem.OpenAppPackageFileAsyn to open the file,…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,523 questions
asked 2023-01-22T22:11:13.7033333+00:00
Riffy 266 Reputation points
accepted 2023-03-19T19:02:29.8+00:00
Riffy 266 Reputation points
1 answer One of the answers was accepted by the question author.

How to get HWND handler from content page in MAUI

I have a HWND written by C++ and we hope added it to content page in MAUI, so how should we handle this case?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2022-06-14T11:58:49.957+00:00
Yang Yang 41 Reputation points
commented 2023-03-19T13:55:53.5+00:00
JD 0 Reputation points
1 answer One of the answers was accepted by the question author.

Error creating Maui app package: GraphQLDefRule rule is missing the "{ItemType}" property

I'm creating MAUI app using HotChocolate for GraphQL. Locally everything works ok (emulator, andriod device). Build run smoothly. But when I'm trying to create App archive, I'm getting error: "Failed to create app. The "GraphQLDefRule"…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-03-13T18:29:42.5866667+00:00
Aleksandrs Maksimovs 20 Reputation points
accepted 2023-03-17T18:53:43.51+00:00
Aleksandrs Maksimovs 20 Reputation points
2 answers One of the answers was accepted by the question author.

Maui Archive Manager is empty after successful build

I'm trying to publish an iOS app (AdHoc) with Visual Studio 2022 (win 64bit, v17.5.1)). My solution is in maui, .net 7 and targets Android and iOS. I use a Mac mini as a buildserver with all updates installed, xcode is at 14.2. I use an iPod Touch 7th…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,761 questions
asked 2023-03-14T11:02:39.0266667+00:00
Tobias Schroer 20 Reputation points
edited an answer 2023-03-17T18:26:02.7166667+00:00
Alexander Kofanov 5 Reputation points
1 answer One of the answers was accepted by the question author.

Maui android keyboard with arrows keys

Hello all. when my app running I want to that the pop-up keyboard will contain arrows keys. if that possible how I added that. Thank you very much.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-03-16T10:22:35.8366667+00:00
Haviv Elbsz 666 Reputation points
accepted 2023-03-17T06:41:48.08+00:00
Haviv Elbsz 666 Reputation points
2 answers One of the answers was accepted by the question author.

Java.Lang.NoClassDefFoundError com.google.android.exoplayer2.source.ConcatenatingMediaSource

I use Xamarin MediaManager version 1.2.2 to play songs in my Android and iOS applications: https://github.com/Baseflow/XamarinMediaManager But the problem is that it is not working in every Android project. For example, it works in a new empty Android…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,523 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-03-06T09:51:29.5066667+00:00
Kim Strasser 561 Reputation points
commented 2023-03-16T09:19:14.93+00:00
Kim Strasser 561 Reputation points
1 answer One of the answers was accepted by the question author.

how to remove or hide indicator carouselview MAUI app

how can i remove or hide this? it appears when i swipe carousel. it happens on iOS

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-03-15T08:57:13.9733333+00:00
Nam Pham 41 Reputation points
accepted 2023-03-16T08:18:40.4566667+00:00
Nam Pham 41 Reputation points
1 answer One of the answers was accepted by the question author.

WeakReferenceMessenger.Default.Register() and WeakReferenceMessenger.Default.Unregister()

After upgrading to net8.0 preview, I was compelled to change the legacy Xamarin-based MessagingCenter.Subscribe() and MessagingCenter.Unsubscribe() methods to WeakReferenceMessenger.Default.Register() and WeakReferenceMessenger.Default.Unregister(),…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,523 questions
asked 2023-03-14T15:45:14.73+00:00
dg2k 806 Reputation points
accepted 2023-03-16T07:53:57.6633333+00:00
dg2k 806 Reputation points
1 answer One of the answers was accepted by the question author.

MAUI Programmatically set Start/Root page

Hi everybody. .net 7, VS 2022 latest, default maui application, mvvm toolkit, an half cup of coffee remaining. I am porting, as a POC, an Android Application to MAUI. I can successufully parse the deep link, and extract 'appmode' variable, storing…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-03-15T07:25:11.9166667+00:00
Dino 65 Reputation points
accepted 2023-03-15T19:09:36.3233333+00:00
Dino 65 Reputation points
2 answers One of the answers was accepted by the question author.

How can I create an app icon on iOS?

I don't know how to create an app icon for my iOS application. I have tried to use Assets.xcassets but it's not working in Visual Studio for Mac 17.6 Preview (17.6 build 402) after adding Maui to my .csproj…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,523 questions
asked 2023-03-06T12:03:49.5566667+00:00
Kim Strasser 561 Reputation points
commented 2023-03-15T11:31:34.0433333+00:00
Kim Strasser 561 Reputation points
3 answers One of the answers was accepted by the question author.

How to change screen orientation in Maui?

In Xamarin there was a class called DeviceInfo with a settable CurrentOrientation property. This class appears to not exist for Maui. I can't figure out how you can change the screen orientation and I can't find an example that can show how's it's…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2022-06-07T00:25:30.037+00:00
chrissolutions 21 Reputation points
commented 2023-03-15T09:03:04.19+00:00
Nam Pham 41 Reputation points
1 answer One of the answers was accepted by the question author.

Maui for android LTR RTL modes problem

This is a complete code that show my issue Hello when runnig this this app the swich to RTL mode its not set focus and not show caret cursor. but for LTR mode its work OK how I fix this Thank you. MainPage.xaml file ------------------ <?xml…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-03-10T12:50:01.7066667+00:00
Haviv Elbsz 666 Reputation points
commented 2023-03-15T05:21:41.79+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 13,501 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Resolving DataTemplate in resources by collection type

I'm trying to display a collection of items in a CollectionView . The items in the collection are of different types, but share the same base class: BaseThing:ObservableObject, ThingA:BaseThing and ThingB:BaseThing, and the ItemsSource for the…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,523 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
598 questions
asked 2023-02-25T19:44:08.5966667+00:00
TerryH 40 Reputation points
accepted 2023-03-13T02:14:55.48+00:00
TerryH 40 Reputation points
2 answers One of the answers was accepted by the question author.

MAUI - Switch content dinamically - MVVM

After a day of attempts, I resign, and hope someone can help me. .Net 7 - Maui - VS2022, latest version. I have several WPF applications and the following scenario is quite simple to implement, but I had no success in MAUI. I have a MainPage.xaml…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-03-09T16:48:39.8533333+00:00
Dino 65 Reputation points
commented 2023-03-13T01:16:54.3466667+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 13,501 Reputation points Microsoft Vendor