SfAvatarView
Strypper opened this issue · comments
Strypper Vandel Jason commented
Description
The .NET MAUI Avatar View control provides a graphical representation of user image that allows you to customize the view by adding image, background color, icon, text, etc.
https://help.syncfusion.com/maui/avatar-view/overview
Public API Changes
<ContentPage.Content>
<Grid>
<sfavatar:SfAvatarView ContentType="Custom"
ImageSource="alex.png"
VerticalOptions="Center"
HorizontalOptions="Center"
HeightRequest="50"
CornerRadius="25"
WidthRequest="50" />
</Grid>
</ContentPage.Content>
using Syncfusion.Maui.Core;
namespace AvatarViewGettingStarted
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
//main grid
Grid mainGrid = new Grid();
// Create an SfAvatarView control.
SfAvatarView avatarview = new SfAvatarView();
avatarview.VerticalOptions = LayoutOptions.Center;
avatarview.HorizontalOptions = LayoutOptions.Center;
avatarview.BackgroundColor = Color.FromRgba("#ffb6c1");
avatarview.ContentType = ContentType.Custom;
avatarview.ImageSource = "alex.png";
avatarview.WidthRequest = 50;
avatarview.HeightRequest = 50;
avatarview.CornerRadius = 25;
mainGrid.Children.Add(avatarview);
this.Content = mainGrid;
}
}
}
Intended Use-Case
- Supports for adding image and initials.
- Customizes the height, width, Stroke, BackgroundColor, and CornerRadius of the view.
- GroupView: Supports to add maximum three custom images or initials in a single view.
- Supports different types of visual styles.
- Supports BadgeView.
Strypper Vandel Jason commented
git fetch origin
git checkout 85-sfavatarview