0

Help, I need to set UWP application window size and position.

I found how to set size:

ApplicationView.PreferredLaunchViewSize = new Size(1500, 800); ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize; 

But I can`t found how to set position?

1
  • Not an option in UWP. You can set a preference with, say, AdjacentToLeftDisplayEdge but that's where it ends. Commented Sep 4, 2019 at 21:21

2 Answers 2

1

From my experience I've found this is not possible. You can set the window size but unfortunately not the position.

Technically speaking... UWP views position is controlled at system level and not app level.

Sign up to request clarification or add additional context in comments.

Comments

0

As far as I have read, this feature (setting up position) is not available for UWP window.

Unfortunately, there is no official APIs which can save/restore windows placement

Look for above statement and few upvote answers in below MSDN community discussion. That explains.

https://social.msdn.microsoft.com/Forums/en-US/6f446f22-591f-481b-9bfa-510521d9de4e/uwp-window-placement?forum=wpdevelop

There is upvote answer in above link (copy pasting it below, in case the link is gone):

In general for the UWP platform, the user decides where the windows go and how big they are. The app itself can only give a few preferences related to minimum size, fullscreen vs. a windowed size but that's about it.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.