Skip to main content
Version: 4.2

AvatarGroup

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Displays overlapping avatars followed by an interactive hidden-item count.

public class AvatarGroup : Control

MaxVisible limits portraits, not stored items. The overflow indicator is additional. Labels are available as accessible names and tooltips; group portraits do not display inline labels. Changes to an item automatically update the group. Images remain owned by the caller.

Example:

var group = new AvatarGroup { MaxVisible = 3, Overlap = 10, Size = new Size(240, 48) };
group.Items.Add(new AvatarItem { Text = "Francesca Longo", Tag = 42 });
group.ItemClick += (s, e) => MessageBox.Show(e.Item.Text);
group.OverflowClick += (s, e) => MessageBox.Show("Show all members");
Controls.Add(group);

Constructors​

Instance member AvatarGroup()​

Creates an empty group displaying up to five 40 pixel portraits.

Properties​

Instance member AvatarSize​

Int32: Gets or sets the portrait diameter from 16 to 256 pixels. The default is 40. (Default: 40)

Instance member AwayText​

String: Gets or sets the localized override for the "away" 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.

Instance member BusyText​

String: Gets or sets the localized override for the "busy" 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.

Protected member DefaultSize​

Size: Gets the default 200 by 40 group size.

Instance member Focusable​

Boolean: Gets or sets focusability of the group container. (Default: False)

Instance member Items​

AvatarItemCollection: Gets the ordered avatar collection.

Instance member MaxVisible​

Int32: Gets or sets the maximum number of portraits, from zero upward. The default is five. (Default: 5)

Zero shows only the overflow count when items exist. Increasing the limit never removes stored items.

Instance member OfflineText​

String: Gets or sets the localized override for the "offline" 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.

Instance member OnlineText​

String: Gets or sets the localized override for the "online" 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.

Instance member Overlap​

Int32: Gets or sets the overlap in pixels, from zero to 255. The default is 10. (Default: 10)

Effective overlap is capped at AvatarSize minus eight pixels so every visible portrait retains a hit target.

Instance member TabStop​

Boolean: Gets or sets participation of the group container in tab navigation; portraits have their own tab stops. (Default: False)

Methods​

Protected member Dispose(disposing)​

Detaches observation and releases items without disposing their images.

ParameterTypeDescription
disposingBooleanWhether managed resources should be released.

Protected member OnItemClick(e)​

Raises ItemClick, including for derived controls without event subscribers.

ParameterTypeDescription
eAvatarItemEventArgsActivated item data.

Protected member OnOverflowClick(e)​

Raises OverflowClick.

ParameterTypeDescription
eEventArgsEvent data.

Protected member OnWebEvent(e)​

Dispatches item and overflow activations.

ParameterTypeDescription
eWisejEventArgsClient event.

Protected member OnWebRender(config)​

Serializes only visible portraits with a versioned activation snapshot.

ParameterTypeDescription
configObjectClient configuration.

Events​

Instance member ItemClick​

EventHandler<AvatarItemEventArgs> Occurs when a visible portrait is activated.

Instance member OverflowClick​

EventHandler Occurs when the overflow indicator is activated.

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.