Skip to content

AvatarView

Javier Suárez edited this page Aug 9, 2020 · 8 revisions

AvatarView

The AvatarView control provides a graphical representation o user image.

Features

  • Supports for adding image and initials.
  • Customizes the size, BorderColor, BackgroundColor, etc.
  • Support different shapes.
  • ControlTemplate support.

Using the control

When using AvatarView without an image, you need to set the initials strings using the following properties:

  • AvatarName
  • AvatarSurName

<controls:AvatarView AvatarName="Javier" AvatarSurName="Suarez" BorderColor="Black" BackgroundColor="Red"/>

You can add a custom user image by setting the ImageSource property.

<controls:AvatarView ImageSource="javier.jpg" BorderColor="Black" BackgroundColor="Red"/>

Shapes

The AvatarView control supports customization using the following built-in shapes using the AvatarShape property:

  • Circle
  • Square

In both cases a predefined size can be used using the AvatarSize property:

  • ExtraSmall
  • Small
  • Medium
  • Large
  • ExtraLarge

Customization

The control provides options to customize the colors and size.

The background color is used for setting color to the background of AvatarView using the BackgroundColor property.

<controls:AvatarView AvatarName="Javier" AvatarSurName="Suarez" BackgroundColor="Red"/>

The border color is used for setting color to the border of AvatarView using the BorderColor property.

<controls:AvatarView AvatarName="Javier" AvatarSurName="Suarez" BorderColor="Black" BackgroundColor="Red"/>

Clone this wiki locally