windowsforms-devexpress-dot-xtrabars-dot-baredititem-13858e8b.md
Occurs before activating an editor.
Namespace : DevExpress.XtraBars
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public event ItemCancelEventHandler ShowingEditor
Public Event ShowingEditor As ItemCancelEventHandler
The ShowingEditor event's data class is ItemCancelEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Cancel | Gets or sets a value indicating whether the editor within an item is read only. |
| Item | Gets the BarItem whose link was clicked. Inherited from ItemClickEventArgs. |
| Link | Gets the clicked BarItemLink. Inherited from ItemClickEventArgs. |
| MouseButton | Gets the pressed mouse button. Inherited from ItemClickEventArgs. |
The following code demonstrates the use of the ShowingEditor event handler which prevents an editor from being activated:
using DevExpress.XtraBars;
private void eItem1_ShowingEditor(object sender, ItemCancelEventArgs e) {
e.Cancel = true;
}
Private Sub eItem1_ShowingEditor(ByVal sender As Object, _
ByVal e As DevExpress.XtraBars.ItemCancelEventArgs) Handles eItem1.ShowingEditor
e.Cancel = True
End Sub
See Also