mcpField
S
syncfusion-wpf-avatar-view

syncfusion-wpf-avatar-view

github.com/syncfusionDesign & UI5155 installsUpdated 1w ago
Repository

About syncfusion-wpf-avatar-view

A reference skill for using Syncfusion’s SfAvatarView in WPF interfaces. It explains avatar content modes, group binding, shapes, styling, and badges for profile and status displays.

Key features

  1. 01Show initials, images, or characters
  2. 02Bind collections for group avatars
  3. 03Choose shape and size
  4. 04Style backgrounds, borders, and text
  5. 05Attach status badges

Use cases

  1. 01Display profile images or initials
  2. 02Show group avatars from a collection
  3. 03Add online or offline indicators

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/syncfusion/wpf-ui-components-skills --skill syncfusion-wpf-avatar-view

After installing, type/syncfusion-wpf-avatar-viewin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
badge-integration.md
content-types.md
customization.md
getting-started.md
visual-styles.md

Details

From the project README

Implementing SfAvatarView (WPF)

When to Use This Skill

Use this skill when the user needs to:

  • Display a user profile picture, initials, or avatar character
  • Show text initials (single or double character) with a colored background
  • Use pre-built avatar characters (Avatar1–Avatar25)
  • Build a group avatar view from a data collection
  • Customize avatar shape (Circle, Square, Custom) and size
  • Apply borders, backgrounds, gradients, or font styling to an avatar
  • Attach a badge (status indicator) to an avatar

Component: SfAvatarView Assembly: Syncfusion.Shared.WPF XAML Namespace: xmlns:syncfusion="http://schemas.syncfusion.com/wpf"


Component Overview

SfAvatarView displays a user avatar in one of five content modes:

ContentTypeWhat it Shows
DefaultBuilt-in Avatar1 character, no setup needed
InitialsText initials extracted from AvatarName
CustomImageUser-supplied image via ImageSource
AvatarCharacterOne of 25 pre-built character images
GroupMultiple avatars from a bound collection

Shape is controlled by AvatarShape (Circle / Square / Custom). Size by AvatarSize (ExtraSmall → ExtraLarge).


Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • NuGet package and assembly setup
  • XAML namespace declaration
  • Minimal working example (Default type)
  • ImageSource quick start
  • Required CSS/theme imports
Content Types

📄 Read: references/content-types.md

  • Default — zero-config avatar character
  • Initials — AvatarName + InitialsType (Single/Double)
  • CustomImage — ImageSource with pack:// URI
  • AvatarCharacter — Avatar1–Avatar25 enum
  • Group view — GroupSource + member path properties + ViewModel pattern
  • ContentTemplate — fully custom DataTemplate rendering
Visual Styles

📄 Read: references/visual-styles.md

  • AvatarShape: Circle (default), Square, Custom
  • AvatarSize: ExtraSmall, Small, Medium, Large, ExtraLarge
  • Custom shape — explicit Height, Width, CornerRadius, FontSize
  • Style reuse via WPF ResourceDictionary
Customization

📄 Read: references/customization.md

  • BorderBrush and BorderThickness
  • Background — solid color
  • Gradient background — LinearGradientBrush / RadialGradientBrush
  • FontFamily, FontSize, Foreground for initials text
Badge Integration

📄 Read: references/badge-integration.md

  • Attaching SfBadge to SfAvatarView
  • Positioning badge with HorizontalPosition / VerticalPosition
  • Status indicator pattern (online/offline dot)

Quick Start Example

xmlns:syncfusion="http://schemas.syncfusion.com/wpf"

Display initials:

<syncfusion:SfAvatarView ContentType="Initials"
                         AvatarName="Alex"
                         InitialsType="DoubleCharacter"
                         AvatarShape="Circle"
                         AvatarSize="Large" />

Display a custom image:

<syncfusion:SfAvatarView ContentType="CustomImage"
                         AvatarShape="Circle"
                         AvatarSize="Large"
                         ImageSource="pack://application:,,,/Assets/profile.png" />

Display a pre-built character:

<syncfusion:SfAvatarView ContentType="AvatarCharacter"
                         AvatarCharacter="Avatar5"
                         AvatarShape="Circle"
                         AvatarSize="Medium" />

Common Patterns

Pattern 1 — Pick content type based on available data:

  • Have a profile image URL → ContentType="CustomImage" + ImageSource
  • Have a name string → ContentType="Initials" + AvatarName
  • Need a placeholder → ContentType="AvatarCharacter" + choose Avatar1–Avatar25
  • Need fully custom UI inside the avatar → ContentTemplate with DataTemplate

Pattern 2 — Group avatar from a list:

  • Bind a collection → ContentType="Group" + GroupSource
  • Map member paths: InitialsMemberPath, ImageSourceMemberPath, BackgroundColorMemberPath, InitialsColorMemberPath

Pattern 3 — Shape + size selection:

  • Profile card with circular avatar → AvatarShape="Circle" + AvatarSize enum
  • Square tile avatar → AvatarShape="Square" + AvatarSize enum
  • Fully custom dimensions → AvatarShape="Custom" + explicit Height/Width/CornerRadius

Key Props Reference

PropertyTypePurpose
ContentTypeAvatarContentTypeSelects rendering mode
AvatarNamestringSource for initials extraction
InitialsTypeAvatarInitialsTypeSingle or double character initials
ImageSourceImageSourceImage URI for CustomImage mode
AvatarCharacterAvatarCharacterPre-built character enum (Avatar1–Avatar25)
AvatarShapeAvatarShapeCircle / Square / Custom
AvatarSizeAvatarSizeExtraSmall / Small / Medium / Large / ExtraLarge
GroupSourceIEnumerableData collection for Group mode
ContentTemplateDataTemplateCustom template for avatar content
BorderBrushBrushBorder color
BorderThicknessThicknessBorder width
BackgroundBrushBackground fill (solid or gradient)
CornerRadiusCornerRadiusRounding for Custom shape

Comments

Markdown supported