Back to Devexpress

XtraMessageBoxArgs.HyperlinkClick Event

windowsforms-devexpress-dot-xtraeditors-dot-xtramessageboxargs.md

latest2.8 KB
Original Source

XtraMessageBoxArgs.HyperlinkClick Event

Fires when a hyperlink is clicked.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public event HyperlinkClickEventHandler HyperlinkClick
vb
Public Event HyperlinkClick As HyperlinkClickEventHandler

Event Data

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

PropertyDescription
LinkGet or sets the URL of the clicked hyperlink.
MouseArgsGets or sets mouse coordinates calculated from the toolbar’s upper left corner.
TextGets or sets the hyperlink alt text. Note that modifying this text does not change the item caption.

Remarks

If the AllowHtmlText option is enabled, you can use HTML tags to format the message box text. Handle the HyperlinkClick to respond to a click on a hyperlink. The Link event argument returns the clicked link. The code below shows how to navigate to the clicked link in the default browser.

csharp
using DevExpress.XtraEditors;

XtraMessageBoxArgs args = new XtraMessageBoxArgs();
args.AllowHtmlText = DevExpress.Utils.DefaultBoolean.True;
args.Text = "<href=www.devexpress.com>Our web site</href>";
args.HyperlinkClick += (s, e) => { System.Diagnostics.Process.Start(e.Link); };
XtraMessageBox.Show(args);
vb
Imports DevExpress.XtraEditors

Dim args As New XtraMessageBoxArgs()
args.AllowHtmlText = DevExpress.Utils.DefaultBoolean.True
args.Text = "<href=www.devexpress.com>Our web site</href>"
AddHandler args.HyperlinkClick, Sub(s, e)
    System.Diagnostics.Process.Start(e.Link)
End Sub
XtraMessageBox.Show(args)

See Also

XtraMessageBoxArgs Class

XtraMessageBoxArgs Members

DevExpress.XtraEditors Namespace