I've ran into a bug in MAUI and I just wanted to know if I'm the only one or if I'm doing something wrong in this new environment :)
Before I've always been able to do this when navigating to a new page via a button click:
private async void OnButtonClicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new Page1());
}
But it does not seem to work anymore, this is how my Page1 looks like in C# code:
public partial class Page1 : ContentPage
{
public Page1()
{
InitializeComponent();
}
protected override async void OnAppearing()
{
base.OnAppearing();
await MainThread.InvokeOnMainThreadAsync(async () => { await LoadRecipes(); });
}
private async Task LoadRecipes()
{
//no code yet
}
}
}
When I run this code and click the button, nothing happens.