How can I use SVG icons for Tabbed pages?
See original GitHub issueHi,
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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:11
Top GitHub Comments
Same problem and same needs for me. If someone has a solution…
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?