Hello,
I can reproduce your issue, you can create a window in the app.xaml.cs, then set window to static, then you can change the MinimumHeight and MinimumWidth in the MainPage's OnAppearing method.
public partial class App : Application
{
public App()
{
InitializeComponent();
//remove following code
// MainPage = new AppShell();
}
public static Window window;
protected override Window CreateWindow(IActivationState activationState)
{
window = new Window(new AppShell());
return window;
}
}
Then you can set it in the MainPage's OnAppearing method.
protected override void OnAppearing()
{
base.OnAppearing();
App.window.MinimumWidth = 600;
App.window.MinimumHeight = 600;
}
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.