Disable Bar Items in Windows Forms PopupMenu

18 Nov 20181 minute to read

NOTE

  1. This feature is not applicable for ListBarItem and StaticBarItem.
  2. In this illustration, the BarItem has been used. Similarly, this has to be set for ParentBarItem, DropDownBarItem, ComboBoxBarItem and TextBoxBarItem.

The unused or unsupported bar items can be disabled by using this feature. BarItems are enabled by default when they are created, but this can be changed based on user requirement through the Enabled property.

The below code snippet will explain how to disable the BarItems.

this.barItem1.Enabled = false;
this.barItem4.Enabled = false;
Me.barItem1.Enabled = False
Me.barItem4.Enabled = False

Disable menu items