代码之家  ›  专栏  ›  技术社区  ›  SurenSaluka

在Windows 10的任务视图中停止UWP应用程序上的屏幕捕获

  •  1
  • SurenSaluka  · 技术社区  · 6 年前

    我停止在我的uwp应用程序上截屏

    applicationView.getForCurrentView().isscreencaptureEnabled=false;
    

    但是,该应用程序仍然在Windows10的任务视图中显示其预览。

    有人能告诉我如何在任务视图中禁用应用程序的预览吗

    这是当前任务视图

    这就是我需要它的方式 .enter image description here

    有人能告诉我如何在任务视图中禁用应用程序的预览吗

    这是当前任务视图 enter image description here

    这就是我需要它的方式

    1 回复  |  直到 6 年前
        1
  •  1
  •   kennyzx    6 年前

    Alt+Tab

    Collapsed

    <Grid>
        <TextBlock FontSize="50" Text="Your controls here!" />
        <Grid Background="Black" x:Name="overlay" Visibility="Collapsed" />
    </Grid>
    

    Window.Current.Activated += Current_Activated;
    

    private void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
    {
        if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
        {
            overlay.Visibility = Visibility.Visible;
        }
        else
        {
            overlay.Visibility = Visibility.Collapsed;
        }
    }