Windows Phone Store - 可以禁用应用程序切换器屏幕截图

时间:2014-11-06 11:30:54

标签: windows-store-apps winrt-xaml windows-phone-8.1

我已停用使用以下功能从我的应用中截取屏幕截图:

ApplicationView.GetForCurrentView().IsScreenCaptureEnabled = false;

但是我希望在应用程序暂停/发送到后台之前隐藏所有内容,以便最近的应用程序或应用程序切换器屏幕中显示的缩略图不会显示任何机密信息。

尝试隐藏onSuspend和Visibility_Changed事件的内容,但我认为只有当用户按下主页按钮(带有Windows徽标的按钮)时才会进行动态拍摄。

你知道任何禁用该功能的方法吗?

1 个答案:

答案 0 :(得分:1)

订阅WindowActivated事件可能值得一试。该名称具有误导性,因为它将在(任何类型)停用时启动;这就是你想要的。我使用它来保存退出方案的信息,例如Home Button press,但是没有测试你是否可以快速重绘。

Protected Overrides Async Sub OnLaunched(e As LaunchActivatedEventArgs)
    ''Stuff
    AddHandler Window.Current.Activated, AddressOf WindowActivated
    ''Stuff
End Sub

Private Sub WindowActivated(sender As Object, e As Windows.UI.Core.WindowActivatedEventArgs)
    If e.WindowActivationState = Windows.UI.Core.CoreWindowActivationState.Deactivated Then
        ''Hide your confidential visuals here
    End If
End Sub