System.Windows.Forms.LinkArea Structure

Represents an area within a System.Windows.Forms.LinkLabel control that represents a hyperlink within the control.

See Also: LinkArea Members

Syntax

[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.LinkArea+LinkAreaConverter))]
public struct LinkArea

Remarks

There are two ways to add a hyperlink to the text of a System.Windows.Forms.LinkLabel control. You can access the System.Windows.Forms.LinkLabel.LinkCollection.Add(int, int) method of the System.Windows.Forms.LinkLabel.LinkCollection class through the LinkLabel.Links property of the System.Windows.Forms.LinkLabel to add multiple hyperlinks to the control's text. If you only need to add a single hyperlink to the text of the control, you can use the LinkLabel.LinkArea property of the System.Windows.Forms.LinkLabel. This property accepts a System.Windows.Forms.LinkArea that defines the location of the hyperlink within the control's text. When a hyperlink is specified using the System.Windows.Forms.LinkArea property, the link area is then added to the System.Windows.Forms.LinkLabel.LinkCollection in the same manner as adding the link using the System.Windows.Forms.LinkLabel.LinkCollection.Add(int, int) method of the System.Windows.Forms.LinkLabel.LinkCollection.

The LinkArea.Length property specifies the number of characters within the text of the System.Windows.Forms.LinkLabel to include in the link area. The LinkArea.Start property specifies the first character in the control text to include in the hyperlink. If you want to determine whether a specific System.Windows.Forms.LinkArea is empty, you can use the LinkArea.IsEmpty property instead of checking the values of the LinkArea.Start and LinkArea.Length properties.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0