<PackageReference Include="System.Security.Permissions" Version="9.0.6" />

UIPermissionWindow

public enum UIPermissionWindow
Specifies the type of windows that code is allowed to use.

Users can use all windows and user input events without restriction.

Users cannot use any windows or user interface events. No user interface can be used.

Users can only use SafeSubWindows for drawing, and can only use user input events for user interface within that subwindow. Examples of SafeSubWindows are a MessageBox, common dialog controls, and a control displayed within a browser.

Users can only use SafeTopLevelWindows and SafeSubWindows for drawing, and can only use user input events for the user interface within those top-level windows and subwindows. See the Remarks section for more information.