UIPermission Class

Controls the permissions related to user interfaces and the clipboard. This class cannot be inherited.

Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)

[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public ref class UIPermission sealed : public CodeAccessPermission, IUnrestrictedPermission
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public final class UIPermission extends CodeAccessPermission implements IUnrestrictedPermission
SerializableAttribute 
ComVisibleAttribute(true) 
public final class UIPermission extends CodeAccessPermission implements IUnrestrictedPermission
Not applicable.

Drawing and user input events in windows are user interfaces.

The permission to use windows can be one of the following: unrestricted, limited to SafeTopLevelWindows, only SafeSubWindows, or no window drawing or user input event access allowed. SafeTopLevelWindows and SafeSubWindows are restricted in title and size to prevent possible spoofing by potentially harmful code.

The permission to use the clipboard can be one of the following: unrestricted, write-only, or no clipboard access allowed. The paste limitation prevents potentially harmful applications from taking data from the clipboard without the user's consent, while still allowing the cut, copy, and paste operations when initiated by the user through keyboard commands.

The following code example shows the behavior of the UIPermission class methods.

NoteNote:

The code example is intended to show the behavior of the methods, not to demonstrate their use. In general, the methods of permission classes are used by the security infrastructure; they are not typically used in applications. Generally, only the constructors are used in application code. The created instance validates or controls resource access by using inherited CodeAccessPermission methods such as Demand.

No code example is currently available or this language may not be supported.

System.Object
   System.Security.CodeAccessPermission
    System.Security.Permissions.UIPermission

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: