Comments (4)
Hi @foreachthing,
As of now the lookup order is hard-coded, cf.:
We did not add the style-concept yet. That would probably a good extension. The way i would go about is to add style-property in xaml, e.g.
<fa:IconBlock Icon="Home" Foreground="Blue" Style="<Regular> or <Solid>" />
As a workaround you can always use the font explicitly in a TextBlock (see Readme) like this
<TextBlock Grid.Column="1" Text="" <----- Use hex-code of "IconChar.FolderOpen" here
FontFamily="/FontAwesome.Sharp;component/fonts/#Font Awesome 5 Free Solid"
Foreground="Chartreuse"
TextAlignment="Center" />
But of course then you lose most of the goodness FontAwesome.Sharp brings to the table ;-)
from fontawesome.sharp.
Thanks for your answer @mkoertgen
I guess I should have mentioned that I am using Windows Forms (somehow I can't get used to wpf).
Any chance of using solids with c#?
from fontawesome.sharp.
Hi @foreachthing,
You can always sub-class the component you want to use and override the FontFor-method.
For example the IconButton
:
public class MyIconButton : IconButton
{
public override FontFor(IconChar icon)
{
if (UseSolid)
return ....
}
}
As of now access to the internally loaded fonts is private/internal in FormsIconHelper.cs but it should be no problem to make this public.
from fontawesome.sharp.
Yeah ... !
I'm fairly new to c# and could not get it to work.
So, I adjusted the code according issue #33, and that was it! :-)
Thanks for your patience and hard work.
from fontawesome.sharp.
Related Issues (20)
- FontAwesome.Sharp package (v5.15.4.0) is unsigned HOT 1
- Add example for nerdfonts
- Add Support for .NET 7, C# 11
- Evaluate https://thenounproject.com/icons/
- Update NuGet Package to 6.2.1 HOT 3
- CVE-2022-34716 (Medium) detected in system.security.cryptography.xml.4.7.0.nupkg
- WS-2022-0161 (High) detected in newtonsoft.json.12.0.3.nupkg, nuke.common.6.1.1.nupkg
- Generate FontAwesome.Sharp.dll for FA Pro? HOT 13
- Image and text are not horizontal aligned. HOT 1
- Update NuGet package FontAwesome.Sharp.Pro HOT 2
- Update NuGet package FontAwesome.Sharp.Pro HOT 6
- Facing a problem from Long Time HOT 2
- FontAwesome Tab doesn't appear on Toolbox (Winform App .NET Framework 4.8) HOT 3
- Missing/Error Fonts HOT 2
- Typo in the .md file for WPF ribbon usage
- Icon button in datagridview HOT 7
- Support / Add example for Open Iconic HOT 1
- Duplicate IconChar entries in property window. HOT 8
- Button content not properly aligned. HOT 6
- How to use with Awesome Pro? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fontawesome.sharp.