LinkLabelExtensions
Wisej.Web.Markup.LinkLabelExtensions
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the LinkLabel class.
public class LinkLabelExtensions
Methods
ActiveLinkColor<TLinkLabel>(linkLabel, activeLinkColor)

Sets the ActiveLinkColor property of the specified LinkLabel.
Returns: TLinkLabel. The modified link label with the updated ActiveLinkColor property.
This method allows you to specify the color of active links in the link label.
myLinkLabel.ActiveLinkColor(Color.Red);
DisabledLinkColor<TLinkLabel>(linkLabel, disabledLinkColor)

Sets the DisabledLinkColor property of the specified LinkLabel.
Returns: TLinkLabel. The modified link label with the updated DisabledLinkColor property.
This method allows you to specify the color of disabled links in the link label.
myLinkLabel.DisabledLinkColor(Color.Gray);
LinkArea<TLinkLabel>(linkLabel, linkArea)

Sets the LinkArea property of the specified LinkLabel.
Returns: TLinkLabel. The modified link label with the updated LinkArea property.
This method allows you to specify the area of text that is treated as a link in the link label.
myLinkLabel.LinkArea(new LinkArea(0, 10));
LinkBehavior<TLinkLabel>(linkLabel, linkBehavior)

Sets the LinkBehavior property of the specified LinkLabel.
Returns: TLinkLabel. The modified link label with the updated LinkBehavior property.
This method allows you to specify the behavior of the link label, such as how the link is displayed when the mouse is over it.
myLinkLabel.LinkBehavior(LinkBehavior.SystemDefault);
LinkColor<TLinkLabel>(linkLabel, linkColor)

Sets the LinkColor property of the specified LinkLabel.
Returns: TLinkLabel. The modified link label with the updated LinkColor property.
This method allows you to specify the color of links in the link label.
myLinkLabel.LinkColor(Color.Blue);
OnLinkClicked<TLinkLabel>(linkLabel, action)

Attaches an event handler for the LinkClicked event of the specified LinkLabel.
Returns: TLinkLabel. The modified link label with the attached LinkClicked event handler.
This method allows you to execute a custom action whenever a link in the link label is clicked.
myLinkLabel.OnLinkClicked((ll, args) =>
{
AlertBox.Show("Link clicked!");
});
Last updated
Was this helpful?