Back to Devexpress

Bar.LinkAdded Event

windowsforms-devexpress-dot-xtrabars-dot-bar-9a85206b.md

latest2.4 KB
Original Source

Bar.LinkAdded Event

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

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public event LinkEventHandler LinkAdded
vb
Public Event LinkAdded As LinkEventHandler

Event Data

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

PropertyDescription
LinkGets 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

LinkDeleted

BarLinkContainerItem.LinkAdded

PopupMenuBase.LinkAdded

Bar Class

Bar Members

DevExpress.XtraBars Namespace