- Home
- Forum
- Xamarin.Forms
- Avatar with initial and custom font icon
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
SIGN IN To post a reply.
4 Replies
HM
Hemalatha Marikumar
Syncfusion Team
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.
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=""
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:
Sample link:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/AvatarViewBadge-1100499630.zip
Please let us know if you have any other queries.
https://www.syncfusion.com/downloads/support/directtrac/general/ze/AvatarViewBadge-1100499630.zip
Please let us know if you have any other queries.
Regards,
Hemalatha M.
MO
mobileguy
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
HM
Hemalatha Marikumar
Syncfusion Team
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.
HM
Hemalatha Marikumar
Syncfusion Team
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.
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
MO mobileguy
- Dec 23, 2019 12:51 PM UTC
- Dec 31, 2019 01:20 PM UTC