Category / Section
How to programmatically open a ParentBarItem's dropdown menu in WinForms XPToolBar?
1 min read
ParentBarItems dropdown menu
The ShowPopup method is used to open a ParentBarItem's dropdown menu programmatically. Please refer the below code snippet which illustrates this:
C#
this.parentBarItem1.Selected += new EventHandler(parentBarItem1_Selected); Private void parentBarItem1_Selected(object sender, EventArgs e) { this.parentBarItem1.ShowPopup(); }
VB
AddHandler ParentBarItem1.Selected, AddressOf parentBarItem1_Selected Private Sub parentBarItem1_Selected(ByVal sender As Object, ByVal e As System.EventArgs) Handles ParentBarItem1.Selected Me.ParentBarItem1.ShowPopup() End Sub