Skip to content

syncfusion/wpf-ui-components-skills / skills/syncfusion-wpf-avatar-view

syncfusion-wpf-avatar-view

Verified

Implement Syncfusion WPF SfAvatarView for displaying user profile avatars and initials. Use this when working with avatar controls, user profile displays, group avatars, or badge integration in WPF. Covers all content types (Default, Initials, CustomImage, AvatarCharacter, Group, ContentTemplate), visual styles (Circle, Square, custom shape/size), appearance customization, and SfBadge integration.

references/badge-integration.md

View on GitHub
# Badge Integration with SfAvatarView (WPF)

## Overview

`SfAvatarView` supports `SfBadge` as an attached property to display status indicators — such as online/offline, notification counts, or activity states.

**Assembly required:** `Syncfusion.Tools.WPF` (for `SfBadge`)

---

## Adding a Badge

Use `SfBadge.Badge` as an attached property on `SfAvatarView`:

```xml
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
    <syncfusion:SfAvatarView ContentType="AvatarCharacter"
                             AvatarCharacter="Avatar1"
                             AvatarShape="Circle"
                             AvatarSize="Large">
        <syncfusion:SfBadge.Badge>
            <syncfusion:SfBadge Shape="None"
                                HorizontalPosition="0.83"
                                VerticalPosition="0.85">
                <syncfusion:SfBadge.Content>
                    <Viewbox>
                        <Grid Height="13" Width="13">
                            <Ellipse Fill="LimeGreen"
                                     Stroke="White"
                                     StrokeThickness="1"/>
                        </Grid>
                    </Viewbox>
                </syncfusion:SfBadge.Content>
            </syncfusion:SfBadge>
        </syncfusion:SfBadge.Badge>
    </syncfusion:SfAvatarView>
</Grid>
```

---

## Badge Positioning

Control badge placement using `HorizontalPosition` and `VerticalPosition` (0.0 = left/top, 1.0 = right/bottom):

| Position | HorizontalPosition | VerticalPosition |
|---|---|---|
| Bottom-right (status dot) | `0.83` | `0.85` |
| Top-right (notification) | `0.83` | `0.15` |
| Bottom-left | `0.17` | `0.85` |
| Center | `0.5` | `0.5` |

---

## Status Indicator Pattern

The most common use — a colored dot indicating online/offline/busy status:

```xml
<syncfusion:SfAvatarView ContentType="AvatarCharacter"
                         AvatarCharacter="Avatar1"
                         AvatarShape="Circle"
                         AvatarSize="Large">
    <syncfusion:SfBadge.Badge>
        <syncfusion:SfBadge Shape="None"
                            HorizontalPosition="0.83"
                            VerticalPosition="0.85">
            <syncfusion:SfBadge.Content>
                <Viewbox>
                    <Grid Height="13" Width="13">
                        <!-- Green = online, Gray = offline, Orange = busy -->
                        <Ellipse Fill="LimeGreen" Stroke="White" StrokeThickness="1"/>
                        <TextBlock FontFamily="Segoe MDL2 Assets"
                                   Text="&#xE930;"
                                   Foreground="White"
                                   HorizontalAlignment="Center"
                                   VerticalAlignment="Center"/>
                    </Grid>
                </Viewbox>
            </syncfusion:SfBadge.Content>
        </syncfusion:SfBadge>
    </syncfusion:SfBadge.Badge>
</syncfusion:SfAvatarView>
```

---

## Notes

- `Shape="None"` on `SfBadge` hides the default badge shape so your custom content fills the area
- Wrap badge content in a `Viewbox` to ensure it scales correctly with the avatar size
- The `Stroke` on the `Ellipse` creates the white ring border between badge and avatar
- To bind status dynamically, bind `Fill` on the `Ellipse` to a color property in your ViewModel
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 196kUpdated Claude CodeCodexVerifiedInstall