I would to put a svg embedded image as ImageSource for a Button in Xamarin.Forms, something like this
<Button Text="Button" ImageSource="resource://fullname.svg">
</Button>
possibly applying a Transformation to svg (from FFImageLoading.Transformations), but this is a plus.
I've tried this syntax
<Button Text="Button"
ImageSource="{ext:ImageResourceExtension fullname.svg}" />
c#
public class ImageResourceExtension : IMarkupExtension
{
private static Assembly Assembly = typeof(ImageResourceExtension).GetTypeInfo().Assembly;
public string Source { get; set; }
public object ProvideValue(IServiceProvider serviceProvider)
{
if (Source == null) return null;
return SvgImageSource.FromResource(Source, Assembly, 32, 32);
}
}
But it's not working.
Moreover I can't make working this syntax
Source="{resource://fullname.svg, Converter={StaticResource SvgImageSourceConverter}}"
Any help? Thanks

