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

FontAwesome v5.8.2 icons not displaying #20

Closed Willy-Kimura closed 5 years ago

Willy-Kimura commented 5 years ago

Following up on the latest addition supporting FontAwesome v5.8.2, some icons, specifically from AngleDoubleLeft to the very last one, Stackpath, are not being displayed when selected. This seems to affect the IconPictureBox control only; the IconButton works seamlessly.

Willy-Kimura commented 5 years ago

Update: Just added the NuGet package and confirmed that for the IconPictureBox, no icon is being displayed when selected.

mkoertgen commented 5 years ago

Thx for the feedback, checking on it.

mkoertgen commented 5 years ago

Sad but true, looking up the glyphs for AngleDoubleLeft, ... resolves to the brands-ttf but should be solid

mkoertgen commented 5 years ago

Turned out the .ToBitmapGdi(...) extension method has problems using the current icons. Also the caching logic seemed a bit odd, so i updated the implementation of IconPictureBox to more closely resemble the other WinForms components.

@Willy-Kimura Pushed a hotfix 5.8.3. Please check again.

segg21 commented 5 years ago

@mkoertgen Hey, I didn't want to make an issue regarding this but, I have a button WPF, and I would like to change the content "icon" of this button on certain states. How would I accomplish doing so? Thanks.

mkoertgen commented 5 years ago

@legitsoulja Commenting from mobile, so please excuse my brevity: There are multiple ways to do this. If you are using MVVM, the cleanest way would be to use an IconBlock as content (nested element instead of xaml attribute) and then bind its icon-property to your view model.

You can find not exact but close examples in the sample application, e.g.

Willy-Kimura commented 5 years ago

Great, will test v5.8.3 and give feedback. Hope there are no breaking changes though.

mkoertgen commented 5 years ago

Closed after inactivity