Edit

Share via


Permission.Enabled Property

Definition

Gets or sets whether the permission settings represented by the Permission object are enabled for the current form.

public:
 property bool Enabled { bool get(); void set(bool value); };
public bool Enabled { get; set; }
member this.Enabled : bool with get, set
Public Property Enabled As Boolean

Property Value

true if the permission settings are enabled; otherwise false.

Examples

In the following example, the Enabled property is used to display whether permission settings are enabled for the current form.

_XDocument3 thisDoc = (_XDocument3)thisXDocument;
thisXDocument.UI.Alert(thisDoc.Permission.Enabled.ToString());
Dim thisDoc As _XDocument3 = DirectCast(thisXDocument, _XDocument3)
thisXDocument.UI.Alert(thisDoc.Permission..Enabled.ToString())

Remarks

Use the Enabled property to determine whether permissions are restricted on the active form, and to enable or disable permissions. Set Enabled to false to disable permissions and to remove all users, other than the form author, and their permissions.

Note: In preview mode, the Enabled property will always return false, and if code attempts to change this setting, a System.Runtime.InteropServices.COMException is raised and the message "The property/method is not available in preview mode" is returned.

Applies to