Articles in this section
Category / Section

How to fire the event before the ParentBarItem drop down shows in WinForms XPToolBar?

1 min read

BeforePopup event

The cancelable BeforePopUp event is fired before the submenus of the ParentBarItem are shown. Please refer the below code snippet which illustrates this:

C#

this.parentBarItem1.BeforePopup += new CancelEventHandler(parentBarItem1_BeforePopup);
void parentBarItem1_BeforePopup(object sender, CancelEventArgs e)
{
   MessageBox.Show("Parent BeforePopUp Event");
}

VB

AddHandler ParentBarItem1.BeforePopup, AddressOf parentBarItem1_BeforePopup
Private Sub parentBarItem1_BeforePopup(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
   MessageBox.Show("Parent BeforePopUp Event")
End Sub

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied