how to set embedded image to button
I tried this
[ContentProperty("Source")]
public class ImageResourceExtension : IMarkupExtension
{
public string Source { get; set; }
public object ProvideValue(IServiceProvider serviceProvider)
{
if (Source == null) { return null; }
var imageSource = ImageSource.FromResource(Source);
return imageSource;
}
}
but not working
Thanks,