更新时间:2023-02-27 08:34:16
您是否使用调试器"STOP"来终止它?按钮?如果是这样,它将不记得大小。尝试在没有调试器的情况下运行它,根据需要调整大小,关闭它。
My UWP app is always launching at the same window size rather than remembering the size it was at previously. This happens on my main dev PC, but I can't reproduce it on my other PC, where the app does remember the size its window was the last time it was closed.
My suspicion is that some remnant of my app is left on the system even after uninstalling. Is there a way to check for this?
-------Other details-----------
I have been updating my app to work on Xbox, and the screen size the app keeps remembering seems to be the size the app runs on Xbox (960x540). No Xbox-related code is running when I deploy to PC (I have verified this thoroughly, and have separate pages for all the Xbox content). My app has an Xbox build configuration, and in that, I do force the window to the Xbox size (to simulate Xbox while debugging), but I have thoroughly confirmed that code does not run unless the app is running on Xbox or with the Xbox build configuration. The app *launches* at the wrong window size, it doesn't change it after launch, which is what my Xbox build config does.
Any ideas?
Visit http://blog.grogansoft.com/ for Windows development fun.
Are you terminating it with the debugger "STOP" button? If so, it won't remember size. Try to run it without the debugger, size it however you want, close it.