windowsforms-devexpress-dot-xtrabars-dot-baritem-9ebd1edb.md
Determines whether the current BarItem is active.
Namespace : DevExpress.XtraBars
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(true)]
[DXCategory("Behavior")]
public virtual bool Enabled { get; set; }
<DefaultValue(True)>
<DXCategory("Behavior")>
Public Overridable Property Enabled As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true if the current BarItem is enabled; otherwise, false.
|
If a specific BarItem is enabled, then its icon and caption appear in full color: and the item can be clicked to perform specific actions. If it is disabled, then its icon and caption appear shaded: and it cannot be clicked.
The following code snippets (auto-collected from DevExpress Examples) contain references 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.
enableBarItem.Checked = showTitlesBarItem.Checked = allowCollapsingBarItem.Checked = false;
enableBarItem.Enabled = showTitlesBarItem.Enabled =
allowCollapsingBarItem.Enabled = layoutModeBarItem.Enabled = false;
connect-winforms-grid-to-dotnetcore-service-enable-pbac/CS/WinForms.Client/MainForm.cs#L107
userIsWriter = true;
addItemButton.Enabled = true;
deleteItemButton.Enabled = true;
{
biFormatPainter.Enabled = false;
biFormatPainter.Checked = false;
connect-winforms-grid-to-backend-using-middletier-server/CS/WinForms.Client/MainForm.cs#L39
this.securedObjectSpace = middleTierClient.CreateObjectSpace();
this.bbiNew.Enabled = middleTierClient.Security.CanCreate<Employee>(securedObjectSpace);
this.bbiEdit.Enabled = middleTierClient.Security.CanWrite<Employee>(securedObjectSpace);
winforms-overlay-form-display-custom-button/CS/Form1.cs#L40
async void OnRunTaskItemClick(object sender, ItemClickEventArgs e) {
biRunTask.Enabled = false;
string taskResult;
layoutModeBarItem.Enabled = False
allowCollapsingBarItem.Enabled = layoutModeBarItem.Enabled
showTitlesBarItem.Enabled = allowCollapsingBarItem.Enabled
If spreadsheetControl.SelectedShape IsNot Nothing OrElse spreadsheetControl.SelectedComment IsNot Nothing Then
biFormatPainter.Enabled = False
biFormatPainter.Checked = False
connect-winforms-grid-to-backend-using-middletier-server/VB/WinForms.Client/MainForm.vb#L28
gridView.FocusRectStyle = Views.Grid.DrawFocusRectStyle.RowFocus
bbiNew.Enabled = RemoteContextUtils.IsGranded(GetType(Employee), SecurityOperations.Create)
bbiDelete.Enabled = RemoteContextUtils.IsGranded(GetType(Employee), SecurityOperations.Delete)
winforms-overlay-form-display-custom-button/VB/Form1.vb#L43
Private Async Sub OnRunTaskItemClick(ByVal sender As Object, ByVal e As ItemClickEventArgs)
biRunTask.Enabled = False
Dim taskResult As String
winforms-spreadsheet-use-custom-cell-editors/VB/DevAVInvoicing/Form1.vb#L109
Dim invoiceItems As DefinedName = sheet.DefinedNames.GetDefinedName("InvoiceItems")
btnRemoveRecord.Enabled = invoiceItems IsNot Nothing AndAlso invoiceItems.Range.RowCount > 1 AndAlso invoiceItems.Range.IsIntersecting(sheet.SelectedCell)
Else
See Also