BadgeView ToolbarItems

Hello, 

I have an application with ToolbarItems (icon cart), and I try to put a BadgeView to show how many items are in the cart. 
Can you tell me if it's possible to use a BadgeView into a ToolbarItems?

Thanks. 
Maxence

3 Replies

RS Ramya Soundar Rajan Syncfusion Team May 27, 2020 01:48 PM UTC

Hi Maxence, 
 
Greetings from Syncfusion. 
  
We have prepared a sample to achieve your requirement. Please find the sample from below location. 
 
 
Output: 
 
 
 
Please refer the below help document link for more information. 
 
 
Please let us know, if your need any further assistance on this. 
 
Regards, 
Ramya S 



MD Maxence Delval May 27, 2020 03:31 PM UTC

Hello, 
Thanks you for the example but I would like to use badgeView into a ToolbarItem.
 <ContentPage.ToolbarItems>
        <ToolbarItem x:Name="cart" Order="Primary" Clicked="CartView_Clicked" Priority="1" IconImageSource="{StaticResource IconCart}"/>
        <ToolbarItem x:Name="liste" Order="Secondary" Clicked="ListView_Clicked" Priority="1" Text="Liste" />
        <ToolbarItem x:Name="print" Order="Secondary" Clicked="Print_Clicked" Priority="1" Text="Imprimer"/>
        <ToolbarItem x:Name="edit" Order="Secondary" Clicked="EditItemView_Clicked" Priority="2" Text="Modifier"/>
        <ToolbarItem x:Name="change" Order="Secondary" Clicked="ChangeView_Clicked" Priority="2" Text="Paramètres"/>
</ContentPage.ToolbarItems>

I don't know if it's possible?
Thanks


RS Ramya Soundar Rajan Syncfusion Team May 28, 2020 08:32 AM UTC

Hi Maxence, 
  
Thanks for the update.  
   
We would like to inform that Xamarin.Forms toolbaritem has only support to add icon and text . Please refer the below link for this. 
  
  
As badge view is a view, so it can be only added when there is supported to add a view for a toolbar item. So, we are not able to add badge view with Xamarin.Forms toolbar item. 
  
Regards,  
Ramya S 


Loader.
Up arrow icon