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. Image for the cookie policy date

Avatar with initial and custom font icon

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


4 Replies

HM Hemalatha Marikumar Syncfusion Team December 24, 2019 03:16 AM

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. 



MO mobileguy December 29, 2019 09:45 PM

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


HM Hemalatha Marikumar Syncfusion Team December 31, 2019 05:19 AM

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. 



HM Hemalatha Marikumar Syncfusion Team December 31, 2019 05:20 AM

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. 


Loader.
Live Chat Icon For mobile
Up arrow icon