Skip to main content

EditorButton.Enabled Property

Gets or sets the Boolean value that determines whether a user can perform actions on the current editor button.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(true)]
[DXCategory("Behavior")]
public virtual bool Enabled { get; set; }

Property Value

Type Default Description
Boolean true

true if an editor button is enabled and a user can perform actions on it; otherwise, false.

Remarks

Use the Enabled property to temporarily disable the current button. The disabled button is displayed grayed and does not react to mouse events. If the button is disabled a user cannot press/click it to invoke its functionality, i.e. the RepositoryItemButtonEdit.ButtonClick and RepositoryItemButtonEdit.ButtonPressed events are not fired when clicking the button. Also when pressing the shortcut associated with the button via the EditorButton.Shortcut property, the ButtonClick event is not fired.

If Enabled is set to true, the button functions as it would normally.

When the property value changes, the button’s EditorButton.Changed event is fired.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Enabled property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also