[UWP]应用程序窗口大小正在重置(仅在一台PC上) [英] [UWP] App window size is resetting (only on one PC)

查看:56
本文介绍了[UWP]应用程序窗口大小正在重置(仅在一台PC上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的UWP应用程序始终以相同的窗口大小启动,而不是记住之前的大小。这发生在我的主开发PC上,但是我无法在我的其他PC上重现它,应用程序确实记住它的窗口大小是最后一次是
关闭。




  • 所有其他UWP应用程序(包括我构建的应用程序)都按预期记住了它们的窗口大小。我已经测试了几个。
  • 我的应用程序记住了我的笔记本电脑上的窗口大小(当然是完全相同的代码)。
  • 我已经卸载了应用程序并尝试在Release中部署它行为没有变化的调试模式
  • 没有代码运行以任何方式检查或修改窗口大小
  • 由于从VS部署的其他应用程序按预期工作我不相信Visual Studio是问题
  • 由于从商店安装的应用程序按预期工作我不相信Windows或UWP平台存在问题
  • 应用程序在不正确的窗口启动size - 它在启动期间不会调整大小,因为如果我的代码中的任何内容都强制进行更改。
  • 我已经比较了App.xaml.cs OnLaunched代码,它正在执行与框架/内容作为我的其他正常行为的应用程序(这个应用程序在另一台PC上表现得如预期的那样,所以我无法想象那里有任何可能的问题)。
  • 我尝试运行一些早期版本该应用程序并遇到了同样的问题 - 即使这些早期版本以前工作正常,所以我认为排除代码。


<我怀疑即使在卸载后,我的应用程序的一些剩余部分仍留在系统上。有没有办法检查这个?



-------其他细节---------- -


我一直在更新我的应用程序以使用Xbox,应用程序记住的屏幕大小似乎是应用程序在Xbox(960x540)上运行的大小。我部署到PC时没有运行与Xbox相关的代码(我已经彻底验证了这一点,并为所有Xbox内容分别设置了
)。我的应用程序有一个Xbox构建配置,在那里,我强制窗口为Xbox大小(在调试时模拟Xbox),但我已经彻底确认代码不会运行,除非该应用程序在Xbox或$上运行b $ b Xbox构建配置。 app *以错误的窗口大小启动*,它在启动后不会更改它,这是我的Xbox构建配置所做的。



任何想法?




访问http://blog.grogansoft.com/进行Windows开发的乐趣。

解决方案

您是否使用调试器"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.

  • All other UWP apps (including apps I've built) are remembering their window size as expected. I have tested several.
  • My app remembers its window size on my laptop (from the exact same code, of course)
  • I have uninstalled the application and tried deploying it in Release and Debug modes with no change in behavior
  • There is no code running that checks or modifies the window size in any way
  • Since other apps deployed from VS work as expected I don't believe Visual Studio is the problem
  • Since apps installed from the store work as expected I don't believe there is a problem with Windows or the UWP platform
  • The app launches at the incorrect window size - it does not resize during the launch as it would if anything in my code was forcing the change.
  • I have compared the App.xaml.cs OnLaunched code, and it is doing the same stuff with the frame/content as my other apps that behave normally (and this app behaves as expected on another PC, so I can't imagine any possible issue there).
  • I tried running some earlier versions of the app and got the same problem - even though those earlier versions worked fine previously, so I think that rules out code.

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.


这篇关于[UWP]应用程序窗口大小正在重置(仅在一台PC上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆