dotMorten / WinUIEx

WinUI Extensions
https://dotmorten.github.io/WinUIEx
MIT License
615 stars 40 forks source link

MaxWidth and MaxHeight and Resizable #81

Closed HEIC-to-JPEG-Dev closed 1 year ago

HEIC-to-JPEG-Dev commented 2 years ago

Would it be possible to implement these properties to the WindowEx ?

dotMorten commented 2 years ago

Can you share some user stories why this is needed? I’m not really following why you’d limit the maximum resize on your users.

HEIC-to-JPEG-Dev commented 2 years ago

Not all applications should be resisable; for example, message/notification windows, modal windows that ask a question/user input, picture in picture (MS say thay should be a set size/ratio), video output or any windows where the size ratio needs to be controlled, the list goes on.

I'm sure there are lots of developers that would like this capability as they have specific requirements. A library, in my mind, should recommend design styles, but not enforce them. For example, if i'm bringing a WPF app to WinUI 3, the end users won't expect the experience to be too different, and more importantly, I need to convert in the easiest way, not redesign my windows because of a lack of capability (that would prevent app migrations).

Hope that helps.

dotMorten commented 2 years ago

Not all applications should be resizable;

there’s already a property for disabling resize capability. Your feature request isn’t about disabling resize, but limit the maximum size during a resize.

HEIC-to-JPEG-Dev commented 2 years ago

Having the extra properties makes it more flexible. I may want a window to be adjusted, but within limits, for example, showing images up to 1:1 ratio but not beyond.

HEIC-to-JPEG-Dev commented 2 years ago

IsResizable doesn't prevent the Maximize of the window, which in effect, changes the window size. I forgot to mention, the IsMaximizable doesn't work as far as I can tell.

dotMorten commented 2 years ago

IsResizable doesn't prevent the Maximize of the window

There's also a setting for removing the maximize button. Wouldn't it be better to remove that - there's a certain expectation that maximize would maximize the window.

I forgot to mention, the IsMaximizable doesn't work as far as I can tell.

That would be a bug that should be reported then.

for example, showing images up to 1:1 ratio but not beyond.

Thank you. That's a valid user story.

HEIC-to-JPEG-Dev commented 1 year ago

Is there any update on this?