Description
.NET version
10.0.100-preview.7.25351.106
Did it work in .NET Framework?
Not tested/verified
Did it work in any of the earlier releases of .NET Core or .NET 5+?
This is a new feature introduced by the #13561 in .NET 10 Preview 6
Issue description
When changing the Form.FormScreenCaptureMode
value, the following issue occurs:
Changing from HideContent
to HideWindow
(or vice versa) does not take effect;
The only way to make it apply is to first set the value to Allow
, and then to the desired mode (HideContent
or HideWindow
).
This behavior is unexpected and not intuitive.
Steps to reproduce
-
Create a Form instance;
-
Set FormScreenCaptureMode = HideContent;
-
Then set FormScreenCaptureMode = HideWindow;
form.FormScreenCaptureMode = ScreenCaptureMode.HideContent;
// This change will not take effect
form.FormScreenCaptureMode = ScreenCaptureMode.HideWindow;
Actual Behavior:
Observe that the behavior still reflects HideContent, not HideWindow.
FormScreenCaptureModeIssue.mp4
Expected Behavior
Any change in the FormScreenCaptureMode value should trigger the necessary system-level updates, regardless of whether the mode is Allow, HideContent, or HideWindow.