Skip to main content
Version: 4.2

ChipGroup

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Displays wrapping selectable chips with optional counts and close buttons.

public class ChipGroup : SegmentedButton

Uses the same Items and selection API as SegmentedButton. Appearance styles each chip independently. Stretch places each chip on its own row and fills the available width. Closing removes the item and updates selection before ChipClosed. Segment.Count is nullable; null hides a count even when ShowCounts is true. Disabled chips cannot be closed by users.

Example:

var filters = new ChipGroup { SelectionMode = SegmentSelectionMode.Multiple, Closable = true, ShowCounts = true };
filters.Items.Add(new Segment { Text = "Open", Count = 24, Value = "open" });
filters.Items.Add(new Segment { Text = "Assigned", Count = 8, Value = "mine" });
filters.SetSelected(0, true);
filters.ChipClosed += (s, e) => MessageBox.Show("Removed " + e.Item.Text);
Controls.Add(filters);

Constructors​

Instance member ChipGroup()​

Initializes a new instance of ChipGroup.

Properties​

Instance member Closable​

Boolean: Gets or sets whether enabled chips expose an independent close action. (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 360 by 120 pixel wrapping area.

Instance member ShowCounts​

Boolean: Gets or sets whether non-null segment counts are displayed. (Default: False)

Methods​

Protected member OnChipClosed(e)​

Raises ChipClosed, including derived overrides without subscribers.

ParameterTypeDescription
eSegmentEventArgsRemoved chip data.

Protected member OnWebEvent(e)​

Dispatches chip removal independently of selection activation.

ParameterTypeDescription
eWisejEventArgsClient event.

Protected member OnWebRender(config)​

Adds chip count and close presentation to the shared snapshot.

ParameterTypeDescription
configObjectClient configuration.

Events​

Instance member ChipClosed​

EventHandler<SegmentEventArgs> Occurs after a user closes and removes a chip. Index is its former position.

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.