Font-Awesome-WPF
Font-Awesome-WPF copied to clipboard
CssClassNameConverter should also accept "fa-" prefixed class names
For example, from http://fontawesome.io/icon/wpforms/:
The string used on the site is fa-wpforms
, but CssClassNameConverter
expects wpforms
.
I worked around this with code such as:
var faConverter = new CssClassNameConverter();
var converter = LambdaConverter.Create<string>(s =>
{
if (s.StartsWith("fa-"))
s = s.Substring(3);
return faConverter.Convert(s, typeof(FontAwesomeIcon), null, null);
});
But it would be better if the library did this.