awesome-inc / FontAwesome.Sharp

A library for using Font Awesome in WPF & Windows Forms applications
Apache License 2.0
385 stars 89 forks source link

Icons for WPF buttons do not show up in designer. #3

Closed jowave closed 6 years ago

jowave commented 7 years ago

I am using FontAwesome.Sharp to place icons on my buttons in a wpf application. When executing the application the icons show just fine, but in the designer only empty rectangles are visible.

I have added FontAwesome.Sharp as nuget dependency and use it for example with the following button declaration in my xaml: <ToggleButton IsChecked="{Binding CrosshairVisible}" ToolTip="Show crosshair" Content="{fa:Icon Crosshairs}"/>

If I open the sample application TestWPF the icons show up in the designer. The major difference I can see is that TestWPF uses a project dependency and I use the nuget package.

mkoertgen commented 7 years ago

The VS Xaml Designer maybe be sensitive about a missing parameterless constructor of the Icon-Markup extension.

I guess this could be solved by either

If this bugs you feel free to submit a PR. Otherwise we will probably consider this fix with the next update of FontAwesome itself (4.6.4+).

Right now, we try to keep version in sync with that of FontAwesome. I am not sure if this is really a good idea but the library seems to be rather stable so this seems to make sense and keep versioning straight and simple.