question

bexolder-5536 avatar image
0 Votes"
bexolder-5536 asked Castorix31 commented

Can I maximize UWP window programmatically?

How to maximize uwp window on startup programmatically? I want maximize my window after startup, because it started minimized and suspended. Its possible?

windows-uwp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Castorix31 avatar image
0 Votes"
Castorix31 answered Castorix31 commented

If you want to set it Full Screen at startup, just after "this.InitializeComponent();", you can call :

 Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().TryEnterFullScreenMode();


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I use Startup Task (https://docs.microsoft.com/en-us/uwp/api/windows.applicationmodel.startuptask?view=winrt-20348) in my app, and I want maximize window after how it loaded.

0 Votes 0 ·

@bexolder-5536 You could also put this line of code in the App.cs before the Window.Current.Activate();

0 Votes 0 ·

It doesn`t work for launching on startup, I mean startup when user log in. And I want maximize window, not full screen.

0 Votes 0 ·
Show more comments