Skip to main content
Version: 4.2

ChipLabel

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Displays a compact status or category label with an optional icon, status dot, and close button.

public class ChipLabel : Control

Text is plain text. Selectable enables user toggling; Selected can always be set in code. Closing raises CloseClick without removing or disposing the control. ChipSize is a visual preset, while the inherited Size specifies outer bounds. Click is available even when Selectable is false.

Example:

var chip = new ChipLabel {
Text = "Healthy", Tone = ChipTone.Success, ShowDot = true,
Closable = true, Selectable = true, Size = new Size(120, 28)
};
chip.CloseClick += (s, e) => chip.Visible = false;
Controls.Add(chip);

Constructors​

Instance member ChipLabel()​

Initializes a new instance of ChipLabel.

Properties​

Instance member ChipSize​

ChipSize: Gets or sets the spacing and font preset. The inherited Size still controls the outer bounds. (Default: Medium)

Instance member Closable​

Boolean: Gets or sets whether a separate close button is displayed. (Default: False)

Instance member CloseText​

String: Gets or sets the localized override for the "Close {0}" text. (Default: null)

The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation. {0} is the item caption. Literal braces can be written as {{ and }}.

Protected member DefaultSize​

Size: Gets the default outer size of 100 by 28 pixels.

Instance member Icon​

String: Gets or sets a Wisej image source, URL, or theme image name displayed before the text. (Default: "")

Instance member Pulse​

Boolean: Gets or sets whether the visible status dot pulses. Reduced motion preferences disable animation. (Default: False)

Instance member Selectable​

Boolean: Gets or sets whether activation toggles Selected. Click is raised in either mode. (Default: False)

This hides Control.Selectable, which controls text selection, and does not modify that property. Turning Selectable off preserves Selected. Programmatic selection remains available.

Instance member Selected​

Boolean: Gets or sets the selection state, raising SelectedChanged once for each actual change. (Default: False)

Instance member Shape​

ChipShape: Gets or sets the pill or rounded rectangle shape. (Default: Pill)

Instance member ShowDot​

Boolean: Gets or sets whether a status dot appears before the text. (Default: False)

Instance member Text​

String: Gets or sets the plain text caption. Null becomes an empty string. (Default: "")

Instance member Tone​

ChipTone: Gets or sets the semantic color palette. (Default: Neutral)

Instance member Variant​

ChipVariant: Gets or sets the soft, filled, or outline color treatment. (Default: Soft)

Methods​

Protected member OnCloseClick(e)​

Raises the CloseClick event.

ParameterTypeDescription
eEventArgsEvent data.

Protected member OnSelectedChanged(e)​

Raises the SelectedChanged event.

ParameterTypeDescription
eEventArgsEvent data.

Protected member OnWebEvent(e)​

Dispatches dedicated activation events and suppresses duplicate pointer clicks.

ParameterTypeDescription
eWisejEventArgsClient event.

Protected member OnWebRender(config)​

Serializes the presentation and wires ordinary events independently of subscriptions.

ParameterTypeDescription
configObjectClient configuration.

Events​

Instance member CloseClick​

EventHandler Occurs when the separate close button is activated. The control remains alive and visible.

Instance member SelectedChanged​

EventHandler Occurs when Selected changes through code or user interaction.

Implements​

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations implement this interface.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.