Xamarin forms Shell ToolBar Badge

S M Hasan 1 Reputation point
2021-06-17T08:32:45.36+00:00

How to add Badge to toolbar with shell, I tried many option including XCT badgeview also, but no success

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,334 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Kyle Wang 5,531 Reputation points
    2021-06-18T02:23:57.62+00:00

    Hi SMHasan-2630,

    Welcome to our Microsoft Q&A platform!

    You can use Shell.TitleView to display views in the navigation bar. So try to add the BadgeView in the Shell.TitleView.

    <Shell.TitleView>  
        <StackLayout Orientation="Horizontal">  
            <Button Text="click"/>  
            <xct:BadgeView  
                BackgroundColor="Red"   
                TextColor="White"  
                FontSize="Small"  
                HorizontalOptions="EndAndExpand"  
                Text="{Binding BadgeCount}" >  
                <ImageButton Source="icon_about.png" BackgroundColor="Transparent"/>  
            </xct:BadgeView>  
        </StackLayout>  
    </Shell.TitleView>  
    

    Regards,
    Kyle


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.