[UWP]窗口放置 [英] [UWP] Window Placement

查看:72
本文介绍了[UWP]窗口放置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我使用ApplicationView.GetForCurrentView()。TryResizeView(新大小(宽度,高度))来成功设置UWP Apps窗口大小,但我想将它放在屏幕上。


有人知道这是否可行?


谢谢,



马克

解决方案

嗨mthomas50,


好问题!


正如您所看到的,TryResizeView()正在尝试按应用程序大小设置窗口大小,返回值将告诉您系统是否允许设置大小。同样的事情,窗口位置由系统级别而不是应用程序级别控制。个人
我认为不可能。


我找不到这样的API,也许直接通过以下方式向我们的产品团队反馈:
https://wpdev.uservoice.com/forums/110705-dev-platform


感谢您的理解。


- James


Hi,

I use ApplicationView.GetForCurrentView().TryResizeView(New Size(width, height)) to successfully set a UWP Apps window size but I would like to centre it on the screen.

Anybody know if this is possible?

Thanks,

Mark

解决方案

Hi mthomas50,

Good question!

As you can see the TryResizeView() is trying to set the window size by the app size, the return value will tell you whether system allow to set the size. The same thing, window position is controlled by system level instead of the app level. Personally I don't think its possible.

And I could not find such API, perhaps feedback to our product team directly with your scenario via: https://wpdev.uservoice.com/forums/110705-dev-platform

Thanks for your understanding.

--James


这篇关于[UWP]窗口放置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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