SurenSaluka
SurenSaluka

Reputation: 1591

Stop screen capture including popup on UWP app of Windows 10

I stopped screen capturing on my UWP app by (Reference)

Frame rootFrame = Window.Current.Content as Frame;
            var mDispatcher = rootFrame.Dispatcher;
            await mDispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                var view = ApplicationView.GetForCurrentView();
                view.IsScreenCaptureEnabled = isSettingEnabled;
            });

However, when the screenshot is made during the app display a popup, it looks like this. enter image description here My question is how do I remove the popup content and make the screenshot fully black.

Upvotes: 1

Views: 273

Answers (1)

Nico Zhu
Nico Zhu

Reputation: 32785

Stop screen capture including popup on UWP app of Windows 10

I make a messagedialog for simulating the scenario, it is reproduced, but It's by design, because the MessageDialog rendered out of current ApplicationView, so it will not response IsScreenCaptureEnabled property, and currently we have no such api to detect snipping tool running from uwp app. so the better way is close the dialog before take screenshot manually or make Popup control or ContentDialog to replace above MessageDialog.

Upvotes: 1

Related Questions