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, IOrientedElement, IOverflowingItemsControl
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl object
Implements:
IOrientedElement IOverflowingItemsControl

Constructors

AvatarGroup()

Initializes an instance of the class.

public AvatarGroup()

Properties

CornerRadius

The CornerRadius for the control's border.

public CornerRadius CornerRadius { get; set; }

Property Value

CornerRadius

IsOverflowed

Indicates 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.

Orientation

The orientation of the control.

public Orientation Orientation { get; set; }

Property Value

Orientation:

The default value is Horizontal.

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.

OverflowOrientation

The orientation of the overflowed items.

public Orientation OverflowOrientation { get; set; }

Property Value

Orientation:

The default value is Horizontal.

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

Defines the CornerRadius property.

public static readonly DependencyProperty CornerRadiusProperty

IsOverflowedProperty

Defines the IsOverflowed property.

public static readonly DependencyProperty IsOverflowedProperty

ItemLengthProperty

Defines the ItemLength property.

public static readonly DependencyProperty ItemLengthProperty

MaxInlineCountProperty

Defines the MaxInlineCount property.

public static readonly DependencyProperty MaxInlineCountProperty

OrientationProperty

Defines the Orientation property.

public static readonly DependencyProperty OrientationProperty

OverflowKindProperty

Defines the OverflowKind property.

public static readonly DependencyProperty OverflowKindProperty

OverflowOrientationProperty

Defines the OverflowOrientation property.

public static readonly DependencyProperty OverflowOrientationProperty

OverflowStringFormatProperty

Defines the OverflowStringFormat property.

public static readonly DependencyProperty OverflowStringFormatProperty

OverflowedItemCountProperty

Defines the OverflowedItemCount property.

public static readonly DependencyProperty OverflowedItemCountProperty

OverlapPercentageProperty

Defines the OverlapPercentage property.

public static readonly DependencyProperty OverlapPercentageProperty

Extension Methods