Ffimageloading: How can I use SVG icons for Tabbed pages?

Created on 12 Feb 2020  路  10Comments  路  Source: luberda-molinet/FFImageLoading

Hi,

I' trying to use FFImageLoader to display SVG icons on tabbed pages:
If I use a PNG image, it's working fine.
<TabbedPage> <ContentPage Title="Test" IconImageSource="icon.png"/> </TabbedPage>
But when I try with an SVG image, I get an XAML design time error.
<ContentPage Title="Test"> <ContentPage.IconImageSource> <ffSvg:SvgCachedImage Source="test.svg"> </ContentPage.IconImageSource> </ContentPage>
Error: Property 'IconImageSource' does not support values of type 'SvgCachedImage'.

I also tried adding from code (in the ContentPage xaml.cs file) . No error, but still not working.
IconImageSource = new FFImageLoading.Svg.Forms.SvgImageSource("folder_24px.svg", 20, 20, true);

What am I doing wrong? How should I do it?

I'm using Xamarin Forms 4.4.0.991640 anf FFImageLoading 2.4.11.982

Most helpful comment

Same problem and same needs for me. If someone has a solution...

All 10 comments

i normally use the png format, xamarin can fill up the color when selected

I'm trying to avoid to upload the images in multiple resolutions, and also I need the same icon in several other places (where svg image display works), so it would be ideal to have a single scalable resource. Is it considered eventually in future developements?

Same problem and same needs for me. If someone has a solution...

Same problem and same needs for me. If someone has a solution...

I tried use the svg to but i converted all my svg to png and it worked. Even the lines of icons are highlited with the selected color.

I didnt use the FFImageLoading

Somebody knows how solve this problem???

Somebody knows how solve this problem???

Its seems no

it is not possible till today but this is i believe more related to xamarin.forms team.

it is not possible till today but this is i believe more related to xamarin.forms team.

i didn't use the FF i simply convert SVG TO PNG and it worked, and i have was possible to change the line colors

Any update on this? Anyone got it working?

damn is still a issue? :/

Was this page helpful?
0 / 5 - 0 ratings