I am using below environment to create windows desktop app
+ Maui / Net 7
+ Windows 10
I need to set the size for each screen, for example:
+ LoginPage : width (400), height(650)
+ MenuPage : width (600), height(800)
I have referred to the link creation settings below:
However, for "LoginPage" it is OK but "MenuPage" gives an error: "Object reference not set to an instance of an object."
Below is my "MenuPage" source and the error that occurs at the line "this.Window.Width = width;"
public partial class Index : ContentPage
protected override void OnAppearing()
const int width = 800;
const int height = 600;
this.Window.Width = width;
this.Window.Height = height;
catch (Exception ex)
I want to ask is there any way to set the size for each page?