Relative Content

Tag Archive for c#maui

WeakReferenceMessenger doesn’t register first message

I am using WeakReferenceMessenger in order to send a message while tapping a Button. The problem is that the first message is sent, but does never get registered. Since the 2nd tap of the Button everything works fine.

How to fill and center HorizontalStackLayout

I have a problem, I have a few buttons and want to center them in a HorizontalStackLayout. I like this HorizontalStackLayout to expand from the left to right side of the window to have the visual appearance I want.
In this case, by choosing HorizontalOptions I can make it from side to side or centered. I can not make it both. Does anyone have some idea how to fix that?

.NET MAUI Navigation.PushAsync in Windows Issue

We have a simple .NET MAUI app with a Login page as the main page and after successful login, we move to (PushAsync) a menu page. This all works fine in Android but when we move over and begin testing in Windows we get an exception when we attempt to PushAsync the Menu page. The exception is ‘Value does not fall within the expected range’.
It appears to be in the Navigation area since we can create the page then add. Page creation works fine. Error happens only when we push it.