Back to Devexpress

BarEditItem.ShowingEditor Event

windowsforms-devexpress-dot-xtrabars-dot-baredititem-13858e8b.md

latest2.4 KB
Original Source

BarEditItem.ShowingEditor Event

Occurs before activating an editor.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public event ItemCancelEventHandler ShowingEditor
vb
Public Event ShowingEditor As ItemCancelEventHandler

Event Data

The ShowingEditor event's data class is ItemCancelEventArgs. The following properties provide information specific to this event:

PropertyDescription
CancelGets or sets a value indicating whether the editor within an item is read only.
ItemGets the BarItem whose link was clicked. Inherited from ItemClickEventArgs.
LinkGets the clicked BarItemLink. Inherited from ItemClickEventArgs.
MouseButtonGets the pressed mouse button. Inherited from ItemClickEventArgs.

Example

The following code demonstrates the use of the ShowingEditor event handler which prevents an editor from being activated:

csharp
using DevExpress.XtraBars;

private void eItem1_ShowingEditor(object sender, ItemCancelEventArgs e) {
    e.Cancel = true;
}
vb
Private Sub eItem1_ShowingEditor(ByVal sender As Object, _
  ByVal e As DevExpress.XtraBars.ItemCancelEventArgs) Handles eItem1.ShowingEditor
    e.Cancel = True
End Sub

See Also

BarEditItem Class

BarEditItem Members

DevExpress.XtraBars Namespace