[UWP]如何更改从Launcher.LaunchUriAsync或其兄弟方法启动的UWP的默认窗口大小

人气:374 发布:2022-09-22 标签: wpdevelop

问题描述

我正在尝试更改由另一个UWP应用启动的UWP应用的大小。例如,通过Launcher.LaunchUriforResultsAsync方法。

不知何故,窗口总是会出现一个小的默认大小。这是一款旨在在台式机或平板电脑上运行的桌面应用。不关心手机。

我们要求向主应用启动相关应用并传递一些数据,然后返回数据。我无法找到任何方法来设置通过LaunchUriXXXX方法启动的应用的初始大小。

ApplicationView.PreferredLaunchViewSize = new Size {Height = 1200 ,宽度= 800}; ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;

根本不会影响它。也没有

ApplicationView.GetForCurrentView()。SetPreferredMinSize(new Size(1200,800));

这是做什么的?

谢谢

解决方案

嗨Johanw1,

对于这个问题,我们试图邀请有经验的人来帮助调查,可能需要一些时间,一旦我们得到任何结果,我们会告诉你。

最好的问候,

guang9Bear

I am trying to change the size of an UWP app that is launched by another UWP app. For example through the Launcher.LaunchUriforResultsAsync method.

Somehow the window is ALWAYS coming up with a small default size. This is a desktop app intended to run on either desktops or tablets. Don't care about phones.

We have a requirement to launch a related app to a main app and pass it some data and then return data. I have not been able to figure out any way to set the initial size of the app launched through LaunchUriXXXX methods.

ApplicationView.PreferredLaunchViewSize = new Size { Height = 1200, Width = 800 }; ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;

Does not effect it at all. Neither does

ApplicationView.GetForCurrentView().SetPreferredMinSize(new Size(1200, 800));

What is the way to do this?

Thanks

解决方案

Hi Johanw1,

For this issue, we are trying to invoke someone experienced to help look into it, it may take some time and as soon as we get any result, we will tell you.

Best Regards,

guang9Bear

208