LabelExtensions
Wisej.Web.Markup.LabelExtensions
Last updated
Was this helpful?
Wisej.Web.Markup.LabelExtensions
Last updated
Was this helpful?
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the Label class.
public class LabelExtensions
Sets the AllowHtml property of the specified Label.
TLabel
label
The label for which to set the AllowHtml property.
value
A boolean indicating whether HTML content is allowed in the label text.
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);
Sets the AllowMarkdown property of the specified Label.
TLabel
label
The label for which to set the AllowMarkdown property.
value
A boolean indicating whether Markdown content is allowed in the label text.
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);
Sets the AutoEllipsis property of the specified Label.
TLabel
label
The label for which to set the AutoEllipsis property.
value
A boolean indicating whether ellipsis characters should be displayed for truncated text.
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);
Sets the AutoSize property of the specified Label.
TLabel
label
The label for which to set the AutoSize property.
value
A boolean indicating whether the label should automatically resize itself to fit its content.
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);
Sets the AutoToolTip property of the specified Label.
TLabel
label
The label for which to set the AutoToolTip property.
value
A boolean indicating whether tooltips should be automatically shown for the 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);
Sets the BorderStyle property of the specified Label.
TLabel
label
The label for which to set the BorderStyle property.
borderStyle
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);
Sets the CharacterCasing property of the specified Label.
TLabel
label
The label for which to set the CharacterCasing property.
characterCasing
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);
Sets the SelfSize property of the specified Label.
TLabel
label
The label for which to set the SelfSize property.
value
A boolean indicating whether the label should automatically adjust its size.
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);
Sets the text alignment for the specified Label control.
TLabel
label
The label for which to set the text alignment.
alignment
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);
Sets the UseMnemonic property of the specified Label.
TLabel
label
The label for which to set the UseMnemonic property.
value
A boolean indicating whether mnemonic characters are used in the label text.
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);
The type of the label, must inherit from .
The type of the label, must inherit from .
The type of the label, must inherit from .
The type of the label, must inherit from .
The type of the label, must inherit from .
The type of the label, must inherit from .
The value to set for the label.
The type of the label, must inherit from .
The value to set for the label text.
The type of the label, must inherit from .
The type of the label, which must inherit from .
The alignment to be applied to the label's text, specified as a value.
The type of the label, must inherit from .