MAUI デスクトップアプリケーションのSizeとPosition

デスクトップアプリケーションのウィンドウのサイズと位置の制御方法
App.xam.cs内に以下のコードを追加する

protected override Window CreateWindow(IActivationState activationState)
{
	var window= base.CreateWindow(activationState);

	window.Height = 600;
	window.Width = 250;

	window.X = 0;
	window.Y = 0;

	return window;
}
 

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

This site uses Akismet to reduce spam. Learn how your comment data is processed.