XmlForm.UserRole 属性

定义

获取或设置表单角色名称的当前用户。

public:
 abstract property System::String ^ UserRole { System::String ^ get(); void set(System::String ^ value); };
public abstract string UserRole { get; set; }
member this.UserRole : string with get, set
Public MustOverride Property UserRole As String

属性值

用户的角色名称在设计模式下通过“工具”菜单上的“用户角色”命令进行定义。

示例

在以下代码示例中,UserRole 属性用于通过当前用户的角色名称设置变量。

string currentRole = this.UserRole; Dim currentRole As String = Me.UserRole

注解

此成员只能由与当前打开的表单在相同域中运行的表单访问,或者由已授予跨域权限的表单访问。

可以通过 Microsoft InfoPath Filler 中打开的表单中运行的代码访问此类型或成员。

适用于