Controls from WPF.UI can't render properly on WPF, .NET Framework 4.8
I did it exactly like the guide, but still can't render it.
And no, this is not from the design view, this is from the built exe.
The same with other elements, <ui:Button/> will result in a 0 width button.
12 Replies
Hi,
an issue like this is very difficult to analyse when you dont have the complete code.
That said, maybe you can use the following:
99% o the time when having issues like this (and it does not matter which language / framework etc) it the cause of:
- Not able to map the font
- Resources missing (not added to the sollution).
- Typo with the resource.
So it could be as simple as that the resource must be included (or set on copy always in the sollution).
Hope this helps
I mean, it's a NuGet package, the thing is I referenced it all the way from App.xaml to UserControl, the only place there can even be code within my control is this xaml (aside from my screenshot):
Read getting started https://wpfui.lepo.co/documentation/getting-started.html
yeah that's what I meant by following the guide.
the IDE doesn't detect anything abnormal either.
My App.xaml:
i was messing around so it's a bit messy
SymbolIcon seems to require a certain font
Because it is a text element
Is that font missing from my System?
Or in your app.
Are you overriding the font in your app?
I'm not sure how to check it, I only added Montserrat.
and I think it didn't work even before I added it. I'm just stumbling on customizing controls so I have to revisit it again.
You might need to override the font property for the SymbolIcon control
To a glyph font
Like
Segoe Fluent Icons
Yeah, but what about other controls, like Button. it doesn't have anything
Use FontIcon to specify an icon using a Glyph value from a FontFamily
Use SymbolIcon specify an icon using a Glyph value from a Symbol enumerationSomeome mentioned this on Github Issues
Like ToggleSwitch and Button are just tiny gray square: