You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
Hi @charri
Maybe I used it wrong but to my understanding the FontAwesome.WPF.Converters.ImageSourceConverter which inherits from MarkupExtension cannot be used as such since its ProvideValue Function returns a this refrence.
Would it be possible to adapt it a little bit so it would be usable as a MarkupExtension ?
Right now I use this as a MarkupExtension :
`
public class ImageSourceFromFont : MarkupExtension
{
private FontAwesomeIcon _icon;
private Brush _brush = new SolidColorBrush(Colors.Black);
public FontAwesomeIcon Icon
{
get { return _icon; }
set { _icon = value; }
}
public Brush IconBrush
{
get { return _brush; }
set { _brush = value; }
}
public override object ProvideValue(IServiceProvider serviceProvider)
{
return ImageAwesome.CreateImageSource(Icon, IconBrush);
}
`
The text was updated successfully, but these errors were encountered:
Ok well I guess its used in a different way then I expected.
Like this you can use the Converter without declaring it as a Resource somewhere.
What I though it would be used like was this:
Hi @charri
Maybe I used it wrong but to my understanding the FontAwesome.WPF.Converters.ImageSourceConverter which inherits from MarkupExtension cannot be used as such since its ProvideValue Function returns a this refrence.
Would it be possible to adapt it a little bit so it would be usable as a MarkupExtension ?
Right now I use this as a MarkupExtension :
`
public class ImageSourceFromFont : MarkupExtension
{
private FontAwesomeIcon _icon;
private Brush _brush = new SolidColorBrush(Colors.Black);
`
The text was updated successfully, but these errors were encountered: