question

SMHasan-2630 avatar image
0 Votes"
SMHasan-2630 asked KyleWang-MSFT edited

Xamarin forms Shell ToolBar Badge

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

dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

KyleWang-MSFT avatar image
0 Votes"
KyleWang-MSFT answered KyleWang-MSFT edited

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.