question

AshishDhar-3421 avatar image
0 Votes"
AshishDhar-3421 asked LeonLu-MSFT edited

How to add carticon in master detail page in Xamarin

I had created master detail page in Xamarin. Now I need to insert cart 83507-masterdetail.jpgicon in the master page.
How can I implement it.


dotnet-xamarin
masterdetail.jpg (25.3 KiB)
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

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

Hello,​

Welcome to our Microsoft Q&A platform!

Do you want to achieve the result like following screenshot?

83671-image.png

If so, please open your Home page. And add ToolbarItems

<ContentPage.ToolbarItems>
        <ToolbarItem Text="New"  
                     Icon="icon.png"  
                     Priority="0"  
                     Order="Primary"  
                     Clicked="ToolbarItem_Clicked"/>

    </ContentPage.ToolbarItems>


======================Update========================

If you want to add number above cart icon, you can refer to this thread.

83780-image.png

Best Regards,

Leon Lu



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.



image.png (32.5 KiB)
image.png (24.8 KiB)
· 2
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.

Thanks,
According the mentioned code I have achieved this.

83567-img1.jpg


Now how can I put the counter on that icon like the following image

83711-img2.jpg


0 Votes 0 ·
img1.jpg (23.1 KiB)
img2.jpg (21.4 KiB)

You are welcome, please see my updated answer please keep one thread for one question, if you have other questions, please create a new thread, it will help others have similar issue, they could find the answer quickly.

0 Votes 0 ·