WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

Make WinUI App Window Same Size as UWP App

Open AathifMahir opened this issue 3 years ago • 8 comments

Currently, UWP app and WinUI Desktop app has Different Initial App Window Size, It would be great if we have same size as UWP app for WinUI 3 Desktop App. Current WinUI 3 Desktop App Window is Wider but when it comes to UWP it's taller and gives more space for contents than WinUI 3 App Window in My Opinion

Proposal: [Make WinUI App Window Same Size as UWP App]

Summary

App Window Size Consistency

Rationale

  • This would make Apps Consistent regardless of App Model

Scope

Capability Priority
This proposal will allow developers to accomplish Consistency regardless of App Model Must
This proposal will allow end users to have consistent experience across the apps Must

Screenshots

Screenshot 2021-06-25 182227 Screenshot 2021-06-25 182158

AathifMahir avatar Jun 25 '21 13:06 AathifMahir

It'd be also nice if we could easily set the minimum window size. This solution introduces a lot of boilerplate code

d2dyno1 avatar Jul 12 '22 20:07 d2dyno1

This can be easily done with WinUIEx (see https://github.com/dotMorten/WinUIEx/). It can not only set the initial window's size and location, but also remember it for next time.

*I use it to fix this WinUI 3 problems in my .NET MAUI and WinUI 3 projects

// In App.xaml.cs
var manager = WinUIEx.WindowManager.Get(window);
manager.PersistenceId = "MainWindowPersistanceId"; // this remembers the last position and size

// set minimums
manager.MinWidth = 640;
manager.MinHeight = 480;

// or just Center the window at every launch
// manager.CenterOnScreen(1024,768); 

LanceMcCarthy avatar Aug 02 '22 21:08 LanceMcCarthy

WinUIEx is a great library, however such basic features should be present out of the box for WASDK.

d2dyno1 avatar Aug 02 '22 22:08 d2dyno1

Yep, make sure your voice is head here (they don't follow other repos) https://portal.productboard.com/winappsdk/1-windows-app-sdk/tabs/2-planned

LanceMcCarthy avatar Aug 02 '22 23:08 LanceMcCarthy

I don't think the team uses Product Board anymore. @BenJKuhn can you confirm/deny? Or maybe @dotmorten can share his experience with PB here?

riverar avatar Aug 02 '22 23:08 riverar

@riverar According to the product board, "Windowing APIs" have already been released 🤦‍♂️

dotMorten avatar Aug 03 '22 00:08 dotMorten