We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Avatar with initial and custom font icon

Thread ID:

Created:

Updated:

Platform:

Replies:

150162 Dec 23,2019 12:51 PM UTC Dec 31,2019 01:20 PM UTC Xamarin.Forms 4
loading
Tags: SfAvatarView
mobileguy
Asked On December 23, 2019 12:51 PM UTC

Hi
Wondering if its possible to have an avatar view with initials and with a badge at the bottom mapped to a custom fonticon rather than a badgeicon?

Does the badge supports font icons?

thanks


Hemalatha Marikumar [Syncfusion]
Replied On December 24, 2019 11:16 AM UTC

Hi Mobileguy, 
 
Greetings from Syncfusion.

We have analyzed the reported query and you can achieve this by using 
a SfBadgeView. We have created a sample by using a SfAvatarView in the content of SfBadgeView and using the font icon for the badge. Please have the sample with code snippet from following. 
  
Code snippet: 
<badge:SfBadgeView VerticalOptions="Center" 
               HorizontalOptions="Center" BadgeText="&#xe700;" 
               HeightRequest="65" WidthRequest="65"> 
  
                <badge:SfBadgeView.Content> 
                    <Grid> 
                    <sfavatar:SfAvatarView ContentType="Initials" AvatarName="Alex" 
                           VerticalOptions="Center" HorizontalOptions="Center"   
                           HeightRequest="50" CornerRadius="25" WidthRequest="50" /> 
                    </Grid> 
                </badge:SfBadgeView.Content> 
  
                <badge:SfBadgeView.BadgeSettings> 
                  <badge:BadgeSetting Offset="-5,-5" BadgePosition="BottomRight" 
                       FontFamily="{StaticResource fontFamily}"/> 
                </badge:SfBadgeView.BadgeSettings> 
  
</badge:SfBadgeView> 
  
Screenshot: 
 
 
  
 
Regards, 
Hemalatha M. 


mobileguy
Replied On December 30, 2019 05:45 AM UTC

Thank you very much for your sample!!
It does exactly what I need .

I guess for resizing on various devices is it a case of setting the avatar size accordingly?

thanks again

Hemalatha Marikumar [Syncfusion]
Replied On December 31, 2019 01:19 PM UTC

Hi Mobileguy, 
 
Thanks for your update. 
 
We would like to let you know that you can customize the actual size of AvatarView by using its HieghtRequest and WidthRequest property even it is rendering with different density devices.  
 
Regards, 
Hemalatha M. 


Hemalatha Marikumar [Syncfusion]
Replied On December 31, 2019 01:20 PM UTC

Hi Mobileguy, 
 
Please ignore the previous update. 
 
We would like to let you know that you can customize the actual size of AvatarView by using its HeightRequest and WidthRequest properties even it is rendering with different density devices.  
 
Regards, 
Hemalatha M. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon