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

794 questions with .NET MAUI tags

Sort by: Updated
1 answer

The type or namespace name 'Platform' does not exist in the namespace 'Microsoft.Maui.Graphics' (are you missing an assembly reference?)

I am using Visual Studio Community 2022 64 bit 4.8.04161 on Windows 11 Pro. I need to be able to draw an image at a particular location. I am attempting to use the documentation at…

.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-16T20:44:11.47+00:00
Randy Clegg 0 Reputation points
commented 2023-03-23T09:45:42.55+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 43,931 Reputation points Microsoft Vendor
1 answer

KeepScreenOn throws error on Android

Hi, I am trying the following: DeviceDisplay.KeepScreenOn = true; inside the App,xaml.cs and it's working fine on iOS but when I run it on Android I get below error: System.NullReferenceException: The current Activity can not be detected. Ensure that you…

.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-15T19:56:19+00:00
Jassim Al Rahma 1,166 Reputation points
answered 2023-03-23T09:38:14.2966667+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 43,931 Reputation points Microsoft Vendor
1 answer

Location permission alert is not showing in android in net maui

I am using below code on xaml page but location permission in not working with promt method protected async override void OnAppearing() { base.OnAppearing(); var status = await…

.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-19T17:13:52.1233333+00:00
anil kumar 51 Reputation points
commented 2023-03-23T09:28:15.8166667+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 13,501 Reputation points Microsoft Vendor
1 answer

simpler RowDefinitions

Hi, I have the following RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto" How can I make it simpler to have 12 Auto Rows? Thanks, Jassim

.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-21T18:17:39.2066667+00:00
Jassim Al Rahma 1,166 Reputation points
answered 2023-03-23T09:24:14.4733333+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 13,501 Reputation points Microsoft Vendor
1 answer

How to change the size of the font for whole project during runtime?

Hello everyone, I want to make a dynamic update of the font size, I tried it like here(https://learn.microsoft.com/en-us/training/modules/use-shared-resources/4-use-and-update-dynamic-resources), but not everything ok, however I used dynamic resources.…

.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-11T09:16:19.26+00:00
Valentine 0 Reputation points
commented 2023-03-23T09:07:25.78+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 13,501 Reputation points Microsoft Vendor
1 answer

如何和在MAUI程序中订阅android的广播消息。

以前在xamarin中可以通过 activity.RegisterReceiver(receiver, new IntentFilter("com.xamarin.example.TEST"));来订阅系统广播,或其他app的广播消息。请问在MAUI中怎么订阅呢?谢谢。

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-02-27T06:15:05.33+00:00
猪哥哥 0 Reputation points
commented 2023-03-23T09:00:38.89+00:00
猪哥哥 0 Reputation points
1 answer

Unable to archive iOS apps

Archiving iOS app in Visual Studio for Mac does not archive anything without error. I didn't know the cause, so I recreated the project, set the signature and archived it, and it worked normally. However, when I tried to archive the same project the next…

.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-09T02:10:08.2533333+00:00
punio 0 Reputation points
edited a comment 2023-03-23T08:46:29.11+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 17,131 Reputation points Microsoft Vendor
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
1 answer

Compatible nuget package for GoogleApiAvailability.Instance.IsGooglePlayServicesAvailable in MAUI

In MAUI, I'm trying to check if GooglePlayStore Is Installed or not in device before redirecting to GooglePlayStore through url but unable to find the package for below code. Here's the sample code that I'm using private bool…

.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-20T11:20:17.6466667+00:00
Mane, PRASHANT GORAKH 26 Reputation points
commented 2023-03-23T06:43:25.65+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 13,501 Reputation points Microsoft Vendor
2 answers

Is there a way we can integrate .NET MAUI onto existing swift code project

I have an project which was developed in Swift using Xcode. Is there a way we can integrate .NET MAUI on to existing Swift project ?

.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-23T01:01:48.7966667+00:00
Sam 0 Reputation points
answered 2023-03-23T06:25:11.0233333+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 17,131 Reputation points Microsoft Vendor
6 answers

Does MAUI support push notification

Does MAUI preview 6 have option to support or handle push notifications using FCM.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2022-08-04T08:30:59.637+00:00
Anjana Jois 1 Reputation point
commented 2023-03-22T10:36:03.7166667+00:00
Muhab Abdulraheem 1 Reputation point
1 answer

How can I use a class declared in a ViewModel as DataType in XAML (MAUI)

Hey everyone! So I'm making a recipe creation tool that uses SQLite in order to learn MAUI. I'm at the point where I'm trying to use different models for ViewModels, the SQLite data, and I want to have separate models per views as well that are declared…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 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-03-21T19:19:40.7033333+00:00
David de Jonge 0 Reputation points
edited an answer 2023-03-22T09:55:06.48+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 17,131 Reputation points Microsoft Vendor
1 answer

How to configure Auto update in MAUI application ?

Hi, Consider we have developed a MAUI application, for deployment of this MAUI application in multiple machine we created a setup file / package following this link -…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,064 questions
asked 2023-01-20T05:42:27.7633333+00:00
Sanket Vinod Solanki 0 Reputation points
commented 2023-03-22T09:25:47.8233333+00:00
Sanket Vinod Solanki 0 Reputation points
1 answer

When I use .NET MAUI, how can I make a menu bar directly under the title bar.

I want to make a menu bar directly under the title bar, but with the .NET MAUI app template, it has AppShell.xaml file, and when I add menu in file MainPage.xaml according to this link…

.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-15T15:08:37.7733333+00:00
Brown SHI 0 Reputation points
commented 2023-03-22T08:40:21.2833333+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 43,931 Reputation points Microsoft Vendor
1 answer

Create Scheduled code every 3 seconds

Hi, I have the following in my MainPage: timer.Interval = TimeSpan.FromSeconds(Preferences.Get("EyeTiming", 3)); timer.Tick += (s, e) => CheckConnection(); timer.Start(); and the CheckConnection() is a class in MainPage that…

.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-09T18:53:59.1566667+00:00
Jassim Al Rahma 1,166 Reputation points
commented 2023-03-22T05:31:23.2766667+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 43,931 Reputation points Microsoft Vendor
1 answer

SetAppThemeColor throws Exception has been thrown by the target of an invocation

Hi, I am trying to set the color with AppTheme in Codebehind using this code: MainThread.BeginInvokeOnMainThread(() => { ButtonDisplayModeAuto.SetAppThemeColor(Button.TextColorProperty,…

.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-16T18:22:31.0066667+00:00
Jassim Al Rahma 1,166 Reputation points
commented 2023-03-22T05:30:06.2766667+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 43,931 Reputation points Microsoft Vendor
1 answer

How to localizae application display name of iOS developed with .NET MAUI?

Display name is localized on android in (Resources\values) folder and it works as expected. However, I can't get it to work with iOS. What have been done: In info.plist make sure there is this code …

.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-16T12:23:51.11+00:00
Muhab Abdulraheem 1 Reputation point
commented 2023-03-22T01:27:40.2233333+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 17,131 Reputation points Microsoft Vendor
3 answers

Once again when will MS fix VS 2022

So I have now spent another couple of hours trying , pleading with Visual Studio to get it together. Notice the status msg, "All Succeeded" meaning no errors but VS shows errors and I have not been able to get rid of them. Clean, Rebuild,…

.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-14T15:46:18.4+00:00
Lloyd Sheen 856 Reputation points
edited an answer 2023-03-21T23:03:56.09+00:00
Rob Caplan - MSFT 4,156 Reputation points Microsoft Employee
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