如何在Windows 8中使用LaunchUriAsync以编程方式最大化一个窗口?[英] How to programmatically maximize a window using LaunchUriAsync in Windows 8?

本文是小编为大家收集整理的关于如何在Windows 8中使用LaunchUriAsync以编程方式最大化一个窗口?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

本文来自:IT宝库(https://www.itbaoku.cn)

如何最大化/最小化启动/当前的Windows Store应用程序,以编程方式使用Windows 8中的LaunchUriaSync?

    private async void Button_Click(object sender, RoutedEventArgs e)
    {
        var options = new Windows.System.LauncherOptions();
        options.TreatAsUntrusted = false;
        options.DisplayApplicationPicker = false;
        Uri target = new Uri("ms-mail:");
        bool isSucceed = await Windows.System.Launcher.LaunchUriAsync(target, options);
    }

推荐答案

在Windows 8中没有办法这样做,但是Windows 8.1添加了DesiredRemainingView property to LauncherOptions, wherein you indicate how you want the launching app to remain on the screen (UseLess, UseHalf, UseMore, UseMinimum, and usenone).

本文地址:https://www.itbaoku.cn/post/438144.html

问题描述

How do I maximize/minimize launching/current windows store applications programmatically using LaunchUriAsync in Windows 8?

    private async void Button_Click(object sender, RoutedEventArgs e)
    {
        var options = new Windows.System.LauncherOptions();
        options.TreatAsUntrusted = false;
        options.DisplayApplicationPicker = false;
        Uri target = new Uri("ms-mail:");
        bool isSucceed = await Windows.System.Launcher.LaunchUriAsync(target, options);
    }

推荐答案

There isn't a way to do this in Windows 8, but Windows 8.1 added the DesiredRemainingView property to LauncherOptions, wherein you indicate how you want the launching app to remain on the screen (UseLess, UseHalf, UseMore, UseMinimum, and UseNone).