Back to Devexpress

StepProgressBar.ItemHyperlinkClick Event

windowsforms-devexpress-dot-xtraeditors-dot-stepprogressbar-80925cb7.md

latest4.5 KB
Original Source

StepProgressBar.ItemHyperlinkClick Event

Occurs when users click on the step progress bar item’s hyperlink.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public event StepProgressBarItemHyperlinkClickEventHandler ItemHyperlinkClick
vb
Public Event ItemHyperlinkClick As StepProgressBarItemHyperlinkClickEventHandler

Event Data

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

PropertyDescription
IsCaptionGets if the hyperlink is displayed in the content block’s caption (Caption).
IsDescriptionGets if the hyperlink is displayed in the content block’s description (Description).
ItemSpecifies the item that contains the hyperlink.
ItemContentBlockGets the clicked hyperlink’s content block.
LinkGet or sets the URL of the clicked hyperlink. Inherited from HyperlinkClickEventArgs.
MouseArgsGets or sets mouse coordinates calculated from the toolbar’s upper left corner. Inherited from HyperlinkClickEventArgs.
TextGets or sets the hyperlink alt text. Note that modifying this text does not change the item caption. Inherited from HyperlinkClickEventArgs.

Remarks

You can display a hyperlink in a step progress bar item’s content block. To do this, set the AllowHtmlText property to True and then add the HTML <href> or <a> tags in the content block’s Caption or Description properties.

The clicked link does not automatically open in the browser. Handle the ItemHyperlinkClick event to perform actions when users click on a hyperlink.

Example

The code below adds a hyperlink to an item, and handles the ItemHyperlinkClick event to open the link in the browser when it is clicked.

csharp
public Form1() {
    InitializeComponent();
    stepProgressBar1.AllowHtmlText = DevExpress.Utils.DefaultBoolean.True;
    spBarItem1.ContentBlock2.Description = "<href=www.devexpress.com>Go to web-site</href>";
  }

  private void stepProgressBar1_ItemHyperlinkClick(object sender, StepProgressBarItemHyperlinkClickEventArgs ea) {
    System.Diagnostics.Process.Start(ea.Link);
  }
vb
Private Function Form1() As Public
    InitializeComponent()
    stepProgressBar1.AllowHtmlText = DevExpress.Utils.DefaultBoolean.True
    spBarItem1.ContentBlock2.Description = "<href=www.devexpress.com>Go to web-site</href>"
    End Function

  Private Sub stepProgressBar1_ItemHyperlinkClick(ByVal sender As Object, ByVal ea As StepProgressBarItemHyperlinkClickEventArgs)
    System.Diagnostics.Process.Start(ea.Link)
  End Sub

See Also

StepProgressBar Class

StepProgressBar Members

DevExpress.XtraEditors Namespace