Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.93 KB

applicationview_tryresizeview_229045332.md

File metadata and controls

43 lines (28 loc) · 1.93 KB
-api-id -api-type
M:Windows.UI.ViewManagement.ApplicationView.TryResizeView(Windows.Foundation.Size)
winrt method

Windows.UI.ViewManagement.ApplicationView.TryResizeView

-description

Attempts to change the size of the view to the specified size in effective pixels.

-parameters

-param value

The new size of the view in effective pixels.

-returns

true if the view is resized to the requested size; otherwise, false.

-remarks

A resize request affects only the view it was requested on. Resizing one view does not affect the size of any other views.

Even when this method returns false, the user can manually resize the view and cause a SizeChanged event to occur.

If the resize forces parts of the app to go outside of available work area, the system will move it back into the available work area.

The resize request has no effect and the method returns false in these cases:

We recommend that you not begin any layout work until the window's SizeChanged event occurs. This avoids two different layout passes (one that happens immediately after TryResizeView and then another when the SizeChanged event occurs).

-examples

-see-also

Window resizing sample, Responsive design 101 for