Font-Awesome-WPF icon indicating copy to clipboard operation
Font-Awesome-WPF copied to clipboard

CssClassNameConverter should also accept "fa-" prefixed class names

Open drewnoakes opened this issue 7 years ago • 0 comments

For example, from http://fontawesome.io/icon/wpforms/:

image

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.

drewnoakes avatar Mar 06 '17 21:03 drewnoakes