AvatarGroup
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.2.0.0)
Displays overlapping avatars followed by an interactive hidden-item count.
- C#
- VB.NET
public class AvatarGroup : Control
Public Class AvatarGroup
Inherits 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
AvatarGroup()
Creates an empty group displaying up to five 40 pixel portraits.
Properties
AvatarSize
Int32: Gets or sets the portrait diameter from 16 to 256 pixels. The default is 40. (Default: 40)
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.
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.
DefaultSize
Size: Gets the default 200 by 40 group size.
Focusable
Boolean: Gets or sets focusability of the group container. (Default: False)
Items
AvatarItemCollection: Gets the ordered avatar collection.
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.
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.
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.
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.
TabStop
Boolean: Gets or sets participation of the group container in tab navigation; portraits have their own tab stops. (Default: False)
Methods
Dispose(disposing)
Detaches observation and releases items without disposing their images.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | Whether managed resources should be released. |
OnItemClick(e)
Raises ItemClick, including for derived controls without event subscribers.
| Parameter | Type | Description |
|---|---|---|
| e | AvatarItemEventArgs | Activated item data. |
OnOverflowClick(e)
Raises OverflowClick.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | Event data. |
OnWebEvent(e)
Dispatches item and overflow activations.
| Parameter | Type | Description |
|---|---|---|
| e | WisejEventArgs | Client event. |
OnWebRender(config)
Serializes only visible portraits with a versioned activation snapshot.
| Parameter | Type | Description |
|---|---|---|
| config | Object | Client configuration. |
Events
ItemClick
EventHandler<AvatarItemEventArgs> Occurs when a visible portrait is activated.
OverflowClick
EventHandler Occurs when the overflow indicator is activated.
Implements
| Name | Description |
|---|---|
| IUserData | Provides access to the UserData and Tag properties associated to the component implementing this interface. |
| IBindableComponent | Bindable components implement this interface. |
| IDropTarget | Controls that support drag & drop operations implement this interface. |
| IWisejComponent | All wisej components implement this interface. |
| IWisejControl | All wisej controls derived from the Control class must implement this interface. |
| IWisejSerializable | Allows an object to serialize itself. |