Articles in this section
Category / Section

How to add custom icon to the badge in .NET MAUI Badge View(SfBadgeView)?

3 mins read

To add custom icon to the badge in the .NET MAUI Badge View, follow the following steps:

Step 1: Initialize the .NET MAUI Badge View control in the sample.

Step 2: Add an Image to place the badge by using BadgeView content, and give require parameters.

Step 3: Assign the Position to place the badge in the bottom right of the image and FontFamily(Custom Font) properties within the BadgeSettings element and set the required ttf file for attaching custom icon in the badge.
XAML

  <sfbadge:SfBadgeView x:Name="badge"
                        BadgeText=""
                        HorizontalOptions="Center" 
                        VerticalOptions="Center" >
            <Image Source="person.png" 
                       HorizontalOptions="Center"
                       VerticalOptions="Center" 
                       HeightRequest="60" 
                       WidthRequest="60"/>
            <sfbadge:SfBadgeView.BadgeSettings>
                <sfbadge:BadgeSettings  Position="BottomRight" 
                                        FontFamily="BadgeViewFont.ttf"/>
                </sfbadge:SfBadgeView.BadgeSettings>
   </sfbadge:SfBadgeView>

Output

Screenshot 2023-08-16 171333.jpg

Conclusion

Hope you enjoyed learning about how to add custom icon to the badge in .NET MAUI Badge View (SfBadgeView)

You can refer to our .NET MAUI Badge View’s feature tour page to learn about its other groundbreaking feature representations. You can explore our .NET MAUI Badge View documentation to understand how to present and manipulate data.

For current customers, you can check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our .NET MAUI Badge View and other .NET MAUI components.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied