awesome-inc / FontAwesome.Sharp

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

AddIcons causes UI glitches [Winforms] #42

Closed milannankov closed 3 years ago

milannankov commented 4 years ago

Hi,

First I would like to thank you for creating and supporting this project.

My problem is as follows. Once I use AddIcons extension method from FormsIconHelper, all labels in my app get ellipses as if there is not enough space to render all text labels. As if AddIcons causes reevaluation of the layout.

Here is the normal app: okay

Here is the app after AddIcons ellipses

Any help would be appreciated.

milannankov commented 4 years ago

I would like to add that I have enabled DPI awareness as described in your samples but the ellipses still appear.

milannankov commented 4 years ago

Some more information. I attached the source project to inspect what is going on but the strangest thing happens. As soon as I invoke some method on the Icon class for example, I get the ellipses and jumbled UI.

For example calling IconHelper.ToChar (only that method) will cause the problem with UI.

mkoertgen commented 4 years ago

Hi @milannankov,

Thanks for reaching out. I do not recall the semantics of "AddIcons" exactly on spot. Will look into this and get back to you.

mkoertgen commented 4 years ago

Hi @milannankov,

I tried to reproduce without success, sorry. I understood that you invoked fa-methods at runtime after the app/forms initialized. You might try to initialize right in the forms ctor.

mkoertgen commented 3 years ago

Closed due to inactivity