In This Article

AvatarGroup Class

Displays a collection of Avatar items.

[TemplatePart(Name = "PART_OverflowButton", Type = typeof(Button))]
[TemplatePart(Name = "PART_OverflowPanel", Type = typeof(Panel))]
public class AvatarGroup : ItemsControl, IOverflowingItemsControl
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl object
Implements:
IOverflowingItemsControl

Constructors

AvatarGroup()

Initializes an instance of the class.

public AvatarGroup()

Properties

CornerRadius

Gets or sets the CornerRadius for the control's border.

public CornerRadius CornerRadius { get; set; }

Property Value

CornerRadius:

The CornerRadius for the control's border.

IsOverflowed

Whether there are any overflowed items.

public bool IsOverflowed { get; }

Property Value

bool

See Also

ItemLength

The uniform width and height to apply to all child avatar items.

public double ItemLength { get; set; }

Property Value

double:

The default value is 40.0.

MaxInlineCount

The maximum number of items that can appear inline within the group.

public int MaxInlineCount { get; set; }

Property Value

int:

The default value is MaxValue.

OverflowKind

An AvatarGroupOverflowKind value indicating how the control should handle overflow scenarios.

public AvatarGroupOverflowKind OverflowKind { get; set; }

Property Value

AvatarGroupOverflowKind:

The default value is Popup.

OverflowStringFormat

The string format to use for displaying the OverflowedItemCount on the overflow button.

public string OverflowStringFormat { get; set; }

Property Value

string:

The default value is '+{0}'.

See Also

OverflowedItemCount

The number of overflowed items.

public int OverflowedItemCount { get; }

Property Value

int

See Also

OverlapPercentage

The horizontal overlap percentage between items.

public double OverlapPercentage { get; set; }

Property Value

double:

The default value is 0.2 (20%).

Methods

ClearContainerForItemOverride(DependencyObject, object)

When overridden in a derived class, undoes the effects of the PrepareContainerForItemOverride(DependencyObject, object) method.

protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameter Type Description
element DependencyObject

The container element.

item object

The item.

GetContainerForItemOverride()

Creates or identifies the element that is used to display the given item.

protected override DependencyObject GetContainerForItemOverride()

Returns

DependencyObject:

The element that is used to display the given item.

IsItemItsOwnContainerOverride(object)

Determines if the specified item is (or is eligible to be) its own container.

protected override bool IsItemItsOwnContainerOverride(object item)
Parameter Type Description
item object

The item to check.

Returns

bool:

true if the item is (or is eligible to be) its own container; otherwise, false.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

OnCreateAutomationPeer()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameter Type Description
element DependencyObject

Element used to display the specified item.

item object

Specified item.

Fields

CornerRadiusProperty

Identifies the CornerRadius dependency property.

public static readonly DependencyProperty CornerRadiusProperty

IsOverflowedProperty

Identifies the IsOverflowed dependency property.

public static readonly DependencyProperty IsOverflowedProperty

ItemLengthProperty

Identifies the ItemLength dependency property.

public static readonly DependencyProperty ItemLengthProperty

MaxInlineCountProperty

Identifies the MaxInlineCount dependency property.

public static readonly DependencyProperty MaxInlineCountProperty

OverflowKindProperty

Identifies the OverflowKind dependency property.

public static readonly DependencyProperty OverflowKindProperty

OverflowStringFormatProperty

Identifies the OverflowStringFormat dependency property.

public static readonly DependencyProperty OverflowStringFormatProperty

OverflowedItemCountProperty

Defines the OverflowedItemCount property.

public static readonly DependencyProperty OverflowedItemCountProperty

OverlapPercentageProperty

Identifies the OverlapPercentage dependency property.

public static readonly DependencyProperty OverlapPercentageProperty