Bar

BarItem.HyperlinkClick Event

Occurs each time an end-user click a hyperlink within the current BarItem.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v20.1.dll

Declaration

public event HyperlinkClickEventHandler HyperlinkClick
Public Event HyperlinkClick As HyperlinkClickEventHandler

Event Data

The HyperlinkClick event's data class is DevExpress.Utils.HyperlinkClickEventArgs.

Remarks

You can place a hyperlink within a BarStaticItem or a BarButtonItem. To do so, allow text formatting via HTML tags (set the BarManager.AllowHtmlText property to true) and use the href tag for the item's caption. Refer to the HTML Text Formatting topic to see all available HTML tags.


public Form1() {
    InitializeComponent();
    ribbonControl1.AllowHtmlText = true;
    barStaticItem1.Caption = "Visit our <href=www.devexpress.com>Web-site</href>";
}

private void barStaticItem1_HyperlinkClick(object sender, DevExpress.Utils.HyperlinkClickEventArgs e) {
    System.Diagnostics.Process.Start(e.Link);
}

You can also handle the BarManager.HyperlinkClick event to handle any hyperlink click within the entire BarManager control.

See Also