WebBrowserPermissionAttribute.Level 属性

定义

WebBrowserPermissionAttribute 获取或设置当前 Web 浏览器权限级别。Gets or sets the current Web browser permission level for the WebBrowserPermissionAttribute.

public:
 property System::Security::Permissions::WebBrowserPermissionLevel Level { System::Security::Permissions::WebBrowserPermissionLevel get(); void set(System::Security::Permissions::WebBrowserPermissionLevel value); };
public System.Security.Permissions.WebBrowserPermissionLevel Level { get; set; }
member this.Level : System.Security.Permissions.WebBrowserPermissionLevel with get, set
Public Property Level As WebBrowserPermissionLevel

属性值

WebBrowserPermissionLevel

当前 Web 浏览器权限级别的状态。The state of the current Web browser permission level.

示例

下面的示例演示如何要求调用代码有权创建在安全级别运行的 Web 浏览器控件。The following example shows how to demand that the calling code has permission to create a Web browser control that runs at a safe level.

[WebBrowserPermissionAttribute(SecurityAction.Demand, Level = WebBrowserPermissionLevel.Safe)]
<WebBrowserPermissionAttribute(SecurityAction.Demand, Level:=WebBrowserPermissionLevel.Safe)>
Public Sub Method02()
End Sub

注解

默认值是 NoneThe default value is None.

XAML 属性用法XAML Attribute Usage

此类的成员通常不在中使用 XAMLXAML ,或不能在中使用 XAMLXAMLMembers of this class are either not typically used in XAMLXAML, or cannot be used in XAMLXAML.

适用于