A newer version of this page is available. Switch to the current version.

RepositoryItemCheckEdit.HyperlinkClick Event

Occurs when a hyperlink within the current RepositoryItemCheckEdit control's caption is clicked.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v19.2.dll

Declaration

[DXCategory("Events")]
public event HyperlinkClickEventHandler HyperlinkClick

Event Data

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

Remarks

If you use HTML Text Formatting to format your CheckEdit control's caption, you can display the desired string as a hyperlink. To do so, use the <href></href> tag. The figure below illustrates the example.

CheckEdit - Hyperlink

To enable HTML text formatting, set the RepositoryItem.AllowHtmlDraw property to DefaultBoolean.True.

When an end-user clicks such a hyperlink, the HyperlinkClick event fires. Handle it to perform required actions. For example, the following code starts a default browser to display the web page, stored within the hyperlink.

checkEdit1.Text = "Visit the <href=www.devexpress.com>DevExpress Web Site</href>";
. . .
private void checkEdit1_Properties_HyperlinkClick(object sender, HyperlinkClickEventArgs e) {
    System.Diagnostics.Process.Start(e.Link);
}

Clicking a hyperlink within a CheckEdit control does not affect its checked state and vice versa, and checking or unchecking a CheckEdit does not trigger the HyperlinkClick event.

See Also