Closed Robmeister89 closed 3 years ago
ok, let me check this. If i add this to the example app the icon works on the button in .net 4. I didn't specify the FontFamily though,
Okay, so it is definitely working in your app. What am I doing wrong? What steps am I supposed to take to use the icon as the button content?
Have you tried to remove the FontFamily?
Yes, unfortunately the others (for some reason or another) only work with it in place?
So a little update on this front... I have removed the FontFamily and placed the icon in the Button.Content as ImageAwesome Icon="Regular_UserCircle" and it works... not sure what's going on with the inline stuff but there is a small work around that I have discovered.
Ok good to hear. I will have a look at the attached property, if i remember correctly it sets the font familiy too.
Could you tell me an icon which didnt worked for you without the font family?
ok, i had a look in the code the attached property is setting the FontFamily according to the set Icon, you you don't need to set the FontFamily directly. I guess you have the FontAwesome otf's installed on your PC and if you specified the FontFamily it took the font from you PC instead of the otf files which are included in the library.
In the example, it looks like every icon works on the button if i don't specify the FontFamily.
Is you project a .Net or .Net Core project?
It is .net
@Robmeister89 that screenshot shows the VS XAML designer, which is known to have problems with embedded fonts.
Do you also have issues at runtime?
So I no longer do it like this. I now use this method:
And it always works at runtime but its always a square instead of an image when viewing it in XAML. I have just learned to live with it lol. I use this method because it takes the style of the textblock so it changes styles with button hovers, etc.
I am getting this a square box instead of an icon for some of them when attempting to use the icon as the content of a button.