LinkLabelLinkClickedEventHandler Delegate
Represents the method that will handle the LinkClicked event of a LinkLabel.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
type LinkLabelLinkClickedEventHandler = delegate of sender:Object * e:LinkLabelLinkClickedEventArgs -> unit
Parameters
- sender
-
Type:
System.Object
The source of the event.
- e
-
Type:
System.Windows.Forms.LinkLabelLinkClickedEventArgs
A LinkLabelLinkClickedEventArgs that contains the event data.
When you create a LinkLabelLinkClickedEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, until you remove the delegate. For more information about delegates, see Handling and Raising Events.
The following example demonstrates using the LinkLabel class, with multiple LinkArea sections defined, to display a label on a form. The example demonstrates setting the AutoSize, LinkBehavior, DisabledLinkColor, LinkColor, and VisitedLinkColor properties to customize the look of the LinkLabel. The first LinkArea is specified using the LinkLabel.LinkArea property. Additional links are added to the LinkLabel using the LinkLabel.LinkCollection.Add method. The example handles the LinkClicked event by starting the Web browser for hyperlinks, and displaying a MessageBox for other links.
Available since 1.1