LabelExtensions
Wisej.Web.Markup.LabelExtensions
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the Label class.
public class LabelExtensions
Methods
AllowHtml<TLabel>(label, value)

Sets the AllowHtml property of the specified Label.
Returns: TLabel. The modified label with the updated AllowHtml property.
This method allows you to enable or disable HTML content in the label text.
myLabel.AllowHtml(true);
AllowMarkdown<TLabel>(label, value)

Sets the AllowMarkdown property of the specified Label.
Returns: TLabel. The modified label with the updated AllowMarkdown property.
This method allows you to enable or disable Markdown content in the label text.
myLabel.AllowMarkdown(true);
AutoEllipsis<TLabel>(label, value)

Sets the AutoEllipsis property of the specified Label.
Returns: TLabel. The modified label with the updated AutoEllipsis property.
This method allows you to control whether ellipsis characters are shown when the text is truncated.
myLabel.AutoEllipsis(true);
AutoSize<TLabel>(label, value)

Sets the AutoSize property of the specified Label.
Returns: TLabel. The modified label with the updated AutoSize property.
This method allows you to control whether the label should automatically resize itself based on its content.
myLabel.AutoSize(true);
AutoToolTip<TLabel>(label, value)

Sets the AutoToolTip property of the specified Label.
Returns: TLabel. The modified label with the updated AutoToolTip property.
This method allows you to enable or disable automatic tooltips for the label.
myLabel.AutoToolTip(true);
BorderStyle<TLabel>(label, borderStyle)

Sets the BorderStyle property of the specified Label.
Returns: TLabel. The modified label with the updated BorderStyle property.
This method allows you to set the border style for the label.
myLabel.BorderStyle(BorderStyle.FixedSingle);
CharacterChasing<TLabel>(label, characterCasing)

Sets the CharacterCasing property of the specified Label.
Returns: TLabel. The modified label with the updated CharacterCasing property.
This method allows you to control the character casing for the text displayed in the label.
myLabel.CharacterCasing(CharacterCasing.Upper);
SelfSize<TLabel>(label, value)

Sets the SelfSize property of the specified Label.
Returns: TLabel. The modified label with the updated SelfSize property.
This method allows you to specify whether the label should automatically adjust its size based on its content.
myLabel.SelfSize(true);
TextAlign<TLabel>(label, alignment)

Sets the text alignment for the specified Label control.
alignment
The alignment to be applied to the label's text, specified as a ContentAlignment value.
Returns: TLabel. The label with the updated text alignment.
This method allows you to specify how the text is aligned within the label's bounds.
myLabel.TextAlign(ContentAlignment.MiddleCenter);
UseMnemonic<TLabel>(label, value)

Sets the UseMnemonic property of the specified Label.
Returns: TLabel. The modified label with the updated UseMnemonic property.
This method allows you to enable or disable the use of mnemonic characters in the label text.
myLabel.UseMnemonic(true);
Last updated
Was this helpful?