Search code examples
windows-runtimewindowresolutionwinjs

WinJS window size


I'm building a small WinJS app just for Windows but can't seem to figure out how to set the size of the window at launch. There is obviously some preset size but I can't seem to resize it using CSS or trying to set the window's size directly.

How do you do it?


Solution

  • It seems this is due to Microsoft wanting all apps in the Universal app eco-system to use responsive design. I was trying to set an initial screen/window size which doesn't really follow that pattern. If this had been for use on a phone or tablet that would make perfect sense, but the intended target was the desktop so I had hoped to circumvent that design.

    I've decided the best course of action is to simply add a div with the correct dimensions and then resize the window (by hand/mouse) to fit around the area of the div since this is just for a personal use project.