Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Bar.LinkAdded Event

Fires immediately after a link has been added to the bar.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public event LinkEventHandler LinkAdded

#Event Data

The LinkAdded event's data class is LinkEventArgs. The following properties provide information specific to this event:

Property Description
Link Gets the link associated with the event.

#Remarks

Write a LinkAdded event handler to perform specific actions each time a link is added to the Bar.ItemLinks collection of the bar. Links can be added to bars at runtime using the following methods:

  • Programmatically, using the Bar.AddItem, Bar.AddItems and Bar.InsertItem methods.
  • By end-users using drag and drop operations on items. (Users can drag items to bars from the Customization window or from other bars. Items can be dragged from bar to bar if the ALT key is pressed.)

If you want to respond to links being added to context menus or sub-menus, handle the PopupMenuBase.LinkAdded and BarLinkContainerItem.LinkAdded events respectively.

See Also