Version

Adding a Hyperlink as an Item in WinExplorerBar

The FormattedLinkEditor class gives you the ability to add hyperlinks to any Ultimate UI for Windows Forms control which uses embeddable editors. FormattedLinkEditor derives from the embeddable editors base class in order to give Ultimate UI for Windows Forms controls this functionality. This topic will guide you through the task of setting up the WinExplorerBar™ control with a single group containing three items, all using the FormattedLinkEditor class.

  1. Create a WinExplorerBar

    1. Drag an UltraExplorerBar control from the toolbox onto your Windows form.

    2. In the Properties window, find the Dock property and set it to Left.

ultraexplorerbar on design surface
  1. Create a group and three items

    1. Right-click on the ExplorerBar and select "Add Group". A group is added.

    2. Right-click on the Group and select "Add Item". An item is added to the group.

    3. Add two more items to the group by repeating the previous step twice.

ultraexplorerbar on design surface with a group that has three items
  1. Create hyperlinks in the three items

    1. Right-click the WinExplorerBar control and select "UltraExplorerBar Designer…". The UltraExplorerBar Designer displays.

    2. Expand the first group.

    3. Select the first item in the group and set its Text property to "<a href="www.infragistics.com">Infragistics</a>".

    4. Select the second item in the group and set its Text property to "<a href="www.microsoft.com">Microsoft</a>".

    5. Select the third item in the group and set its Text property to "<a href="www.google.com">Google</a>".

    6. Click Close.

the items of an ultraexplorerbar group have their text property set to anchor tags
  1. Set WinExplorerBar’s editor control to a WinFormattedLinkLabel

    1. Drag an UltraFormattedLinkLabel control from the toolbox onto your Windows form.

    2. Make sure the WinExplorerBar is selected and expand ItemSettings in the Properties window.

    3. Find the EditorControl property and set it to ultraFormattedLinkLabel1. The items in the WinExplorerBar change from raw text to formatted hyperlinks.

adding a hyperlink as an item in ultraexplorerbar
  1. Run the Program

Click on any of the links and an Internet Explorer window will open with the appropriate link.

adding a hyperlink as an item in winexplorerbar
Note
Note

The WinFormattedLinkLabel control will always use the .NET Process class to open a new link. Therefore, it is up to the system, not WinFormattedLinkLabel, to decide how to handle the opened link.