Forum Xamarin.Forms

How to use svg image for tabbed page tabbar icon?

I searched around and found that we can use third-party library to render svg in pages. But I don't know how to use svg as tabbar icon. Can anyone help me on it please?

Best Answer

Answers

  • batmacibatmaci DEMember ✭✭✭✭✭
    edited May 2020

    @ColeX thanks for this answer but is there a way to use svg in xamarin. UWP tabbed page?

  • ColeXColeX Member, Xamarin Team Xamurai

    On the Universal Windows Platform (UWP), the list of tabs appears at the top of the screen, and the details area is below. Each tab consists of a title. However, icons can be added to each tab with a platform-specific. For more information, see https://docs.microsoft.com/en-gb/xamarin/xamarin-forms/platform/windows/tabbedpage-icons , try to set svg image directly on ContentPage.IconImageSource.

  • batmacibatmaci DEMember ✭✭✭✭✭

    @ColeX said:
    On the Universal Windows Platform (UWP), the list of tabs appears at the top of the screen, and the details area is below. Each tab consists of a title. However, icons can be added to each tab with a platform-specific. For more information, see https://docs.microsoft.com/en-gb/xamarin/xamarin-forms/platform/windows/tabbedpage-icons , try to set svg image directly on ContentPage.IconImageSource.

    I did that but it didnt work. It occupies the space for the svg, i can see it but svg image is not displayed. I tried with 3 different svg files and all had same behavior. I set the type "Content". Same way png is working fine.

  • aaRopi_99aaRopi_99 Member

    Thanks @Dinesh_Official ! That has been incredibly helpful, especially for Android! :smile:

Sign In or Register to comment.