Hi Andrew,
The PopupMenu does not have "AfterPopup" or any other similar Events. But the ParentBarItem has "PopupClosed" Event which can be used to remove the Items from the PopupMenu.
Add new BarItems to the PopupMenu in the PopupMenu's "BeforePopup" event and remove those items in the PopupMenu's ParentBarItem "Popupclosed" event. Here is the code snippet for doing the same.
BarItem b1 = new BarItem();
void popupMenu1_BeforePopup(object sender, Syncfusion.Windows.Forms.CancelMouseEventArgs e)
{
if (popupMenu1.GetPopupParentControl() == gradientPanel2)
{
b1.Text = "Newly Added";
b1.ID = "New";
parentBarItem1.Items.Add(b1);
}
}
private void parentBarItem1_PopupClosed(object sender, EventArgs e)
{
parentBarItem1.Items.Remove(b1);
}
I have attached a sample. Hope this is what you actually needed.
PopupEvents.zipBest Regards,
Purusothaman.R