Reputation: 3314
I have tried the code in How get different size windows in UWP Multiple Views?, but I found a problem.
The new windows size must depend on the current windows size, which means if I use
newAppView.TryResizeView(new Size { Width = 300, Height = 200 });
does not work.
But use
newAppView.TryResizeView(new Size { Width = rect.Width - 300, Height = rect.Height - 200 });
works.
Then how to set a new window size, ignoring current window size.
Upvotes: 1
Views: 42
Reputation: 7737
It is not that setting the window size is invalid, but that the values you set for Width
and Height
are not in the valid range.
Default:
As long as either Width
or Height
is below the minimum value, the window cannot be resized.
Upvotes: 1