awesome-inc / fontawesome.sharp Goto Github PK
View Code? Open in Web Editor NEWA library for using Font Awesome in WPF & Windows Forms applications
License: Apache License 2.0
A library for using Font Awesome in WPF & Windows Forms applications
License: Apache License 2.0
Do I need to install a font or something in the other PC if I want to run my application with the executable and not from Visual Studio.
All icons seem to be rendered with Regular style. How to I render Solid icons?
Is this possible ?
If Yes how ?
Is there a way one can get the currently set FontAwesome Image/Icon?
As of currently, there seems to be no way.
Seems the base Image doesn't return the applied FontAwesome Icon since it's serialization is hidden.
Or at least in the properties grid drop down sort them alphabetically.
Warning CS8002 Referenced assembly 'FontAwesome.Sharp, Version=4.7.1.0, Culture=neutral, PublicKeyToken=null' does not have a strong name.
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 app after AddIcons
Any help would be appreciated.
We experienced exception on installed software
************** Exception Text **************
System.Runtime.InteropServices.COMException (0x800A01E1): Exception from HRESULT: 0x800A01E1 (CTL_E_INVALIDPICTURE)
at System.Windows.Forms.UnsafeNativeMethods.IPersistStream.Load(IStream pstm)
at System.Windows.Forms.Cursor.LoadPicture(IStream stream)
when we try to change Icon of the button like code below
markQuestionBtn.IconChar = FontAwesome.Sharp.IconChar.CheckSquare;
What could be the issue?
OS Windows 10 Home and It's working fine on Windows 10 pro but having issue on Home edition only.
In WPF designer i do not see the Icons. In the compiled program however they are displayed
I am using FontAwesome.Sharp to place icons on my buttons in a wpf application. When executing the application the icons show just fine, but in the designer only empty rectangles are visible.
I have added FontAwesome.Sharp as nuget dependency and use it for example with the following button declaration in my xaml:
<ToggleButton IsChecked="{Binding CrosshairVisible}" ToolTip="Show crosshair" Content="{fa:Icon Crosshairs}"/>
If I open the sample application TestWPF
the icons show up in the designer. The major difference I can see is that TestWPF
uses a project dependency and I use the nuget package.
After reading @dennisdoomen blog post 14 reasons for adopting Nuke as your next build automation tool we adopted nuke in some projects recently. So far the experience has been great and we can't think of any solid reasons to stay with Cake.
Here is some context:
Hello,
I managed to implement this into our application, but now I am wondering, if you support FA Pro as well.
As our designer used almost Pro Icons only, this would be great. I could not find information about this in the project.
Greetings,
Maik
Postponed after #11
Hello,
I've been migrating my code to .net 5.0 and found that font awesome sharp icons (not all but most of them) not load at all .
For example the icons ideal and faucet are working however the cogs and settings aren't.
I've tried sorting the problem but without any luck.
Is it too early to ask if we can use it for windows form .Net Core..?
How to rotate icon? I'm using IconPictureBox
hi, pls add a string parser to add icons to textblock, rtb, etc like this:
:btc: is a cryptocurrency. :EURO: is a fiat money
Hi, It's probably that I don't know how do it...but, how Can I show the objects (for example "IconButton") in the toolbox of visual studio?
I have realized that I can put an IconButton making a copy-paste from the project sample, but I don't see IconButton in toolbox.
Thanks in advance!
When an IconPictureBox is instantiated on a form in a WinForms application, it reduces the display scale of the ENTIRE application to the Windows out-of-the-box standard 96 dpi. This is a rather annoying issue for users who prefer to run at a higher logical dpi.
To reproduce, make sure your system settings are as follows, before running your application:
System: Windows 10
System fundamental dpi: 96
Monitor scaling: 125% (120 dpi)
App forms are set to AutoScaleMode = Font
When you run your application, as soon as an IconPictureBox is instantiated with new in the designer file's InitializeComponent method, the application will immediately shrink to the system dpi for the remainder of the time the application is running.
Hello,
How to use FontAwesome Sharp on high DPI screens?
I have an application developed in 1080p screen and now on 4K screen the icon buttons changes then whole forms look to very tiny and compact windows forms.
when I remove the icon button and add the normal windows forms button everything is work and looks fine as it should be.
is there any guide that I can look at to set the icon buttons or icon picture box work on any DPI screen.
Looking forward to hearing from you. Thanks
Hi,
Great job with this library. Many thanks.
Could you allow switching between FontAwesome and MaterialDesign icons since they all work the same way in terms of parsing the icons from font; only the icons-list or IconChar
enumeration will be modified.
We can then use a property such as:
IconLibrary = IconLibraries.Material;
or IconLibrary = IconLibraries.FontAwesome;
This would really come in handy as an addition. Any help will be appreciated.
Thanks for the fantastic work so far.
There's a new FontAwesome update, v5.8 with 118 new icons and brands.
I'm using markdown icons with your guys' library- first of all, great job! It's great to have something like this that supports WinForms.
I'm running into an issue where getting a bitmap of the icon is throwing a 'Sequence contains multiple elements' exception. Since your project is open source, I looked into the method and troubleshooted (troubleshot? idk..) the issue down to the ToChar() method. It uses the .Single() instead of the .First() linq command (which is arguably more correct).
I'd love your guys' input!
Thanks!
Greg
Source: NuGet
Package: FontAwesome.Sharp
Version: v5.13
Platform: Windows Forms desktop application
I am using the FontAwesome.Sharp NuGet on my .NET (C#) Winforms project. I have used it to show FA icons on ToolStripMenuItems and Buttons and noticed that the icon is NOT vertically aligned on System.Windows.Forms controls. When the icon is displayed on the control, the icon looks shifted down so it does not look 'awesome'.
Hi,
To start, nice work!
I noticed though that once you add the control in winforms (IconPictureBox), and then you try to use the "Properties" window to set the IconChar, there are few issues:
Not a big problem, I just select it in code, but I think the solution is just to sort it alphabetically or to do the parsing or whatever is done in this window when one types in something.
FormsIconHelper's ToBitmap method only accepts a single size param.
For underlying fonts that are much wider than tall (or vice versa), it creates a much smaller image than intended.
Exposing a way to explicitly set the width and height would be helpful.
I created a fork with this change if you'd like to merge it.
I am trying to Create a WindowsForm Core Application that shows all the Images with Name in the form and keep it as Reference because dropdown calls for a lengthy search.
Can I get some help?
When you Open my Application you will have an Alphabet Selector based on this
I want to show PictureBoxes with the Image(IconChar) and a Label below that has its name use this as a quick reference while using your Framework.
Hi,
I had to add this to my Window tag:
xmlns:fa="http://schemas.awesome.incremented/wpf/xaml/fontawesome.sharp"
in my XAML file before I could use :
<fa:IconBlock
Icon="Info" Foreground="Chocolate"/>
Is that still the correct namespace URL to use? I found it here.
And, you should update your README to include the above step because it is not mentioned.
Stamps an assembly with git information based on SemVer.
path: /FontAwesome.Sharp/FontEnumGenerator/packages.config,/FontAwesome.Sharp/TestWpf/packages.config,/FontAwesome.Sharp/FontAwesome.Sharp/packages.config,/FontAwesome.Sharp/FontAwesome.Sharp.Tests/packages.config,/FontAwesome.Sharp/TestForms/packages.config
Library home page: https://api.nuget.org/packages/gitversiontask.4.0.0.nupkg
Dependency Hierarchy:
YamlDotNet version 4.3.2 and earlier contains a Insecure Direct Object Reference vulnerability in The default behavior of Deserializer.Deserialize() will deserialize user-controlled types in the line "currentType = Type.GetType(nodeEvent.Tag.Substring(1), throwOnError: false);" and blindly instantiates them. that can result in Code execution in the context of the running process. This attack appear to be exploitable via Victim must parse a specially-crafted YAML file. This vulnerability appears to have been fixed in 5.0.0.
Publish Date: 2018-07-13
URL: CVE-2018-1000210
Base Score Metrics:
Step up your Open Source Security Game with WhiteSource here
Hi!
would it be possible to add an (optional?) parameter to the .ToBitmap() fiunction which allows explicitly specifying which IconFont to use?
it currently seems to use regular (if available) - but I sometimes need the solid version (e.g. for "disk")
thanks
My antivirus has detected the following viruses in this package:
Gen:VariantUrsu.895382
Trojan.GenericKDA3300007
Hi, I have a problem. One of my testers launched the application and threw this error out of him. Can I ask for help? I'm just learning C #. Thank you
at System.ModuleHandle.ResolveMethod(RuntimeModule module, Int32 methodToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount)
at System.ModuleHandle.ResolveMethodHandleInternalCore(RuntimeModule module, Int32 methodToken, IntPtr[] typeInstantiationContext, Int32 typeInstCount, IntPtr[] methodInstantiationContext, Int32 methodInstCount)
at System.ModuleHandle.ResolveMethodHandleInternal(RuntimeModule module, Int32 methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.CustomAttributeData..ctor(RuntimeModule scope, CustomAttributeRecord caRecord)
at System.Reflection.CustomAttributeData.GetCustomAttributes(RuntimeModule module, Int32 tkTarget)
at System.Reflection.CustomAttributeData.GetCustomAttributesInternal(RuntimeAssembly target)
at System.Reflection.RuntimeAssembly.GetCustomAttributesData()
at System.Reflection.CustomAttributeData.GetCustomAttributes(Assembly target)
at System.Resources.ManifestBasedResourceGroveler.GetNeutralResourcesLanguage(Assembly a, UltimateResourceFallbackLocation& fallbackLocation)
at System.Resources.ResourceManager.CommonSatelliteAssemblyInit()
at System.Resources.ResourceManager..ctor(String baseName, Assembly assembly)
at MS.Internal.Resources.ResourceManagerWrapper.get_ResourceManager()
at MS.Internal.Resources.ResourceManagerWrapper.GetStream(String name)
at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
at System.IO.Packaging.PackagePart.GetStream()
at System.Windows.Application.GetResourceStream(Uri uriResource)
at FontAwesome.Sharp.FormsIconHelper.GetFontBytes(String fontFile, Assembly assembly, String path)
at FontAwesome.Sharp.FormsIconHelper.AddFont(PrivateFontCollection fonts, String fontFile, Assembly assembly, String path)
at FontAwesome.Sharp.FormsIconHelper.InitializeFonts()
at FontAwesome.Sharp.FormsIconHelper..cctor()
at FontAwesome.Sharp.FormsIconHelper.FontFamilyFor(IconChar iconChar)
at FontAwesome.Sharp.IconButton..ctor()
at Launcher.WindowInstall.InitializeComponent()
at Launcher.WindowInstall..ctor()
at Launcher.Program.Main(String[] args)
System Information
Application | Launcher |
---|---|
Version | 1.0.0.0 |
Date | 2020-10-16 16:34:43Z |
OS | Windows 7 Service Pack 1 |
CLR | 4.0.30319.1 |
CrashReporter.NET Version | 1.5.8.0 |
Hello,
I've installed FontAwesome.Sharp from NuGet Package Manager on a fresh .Net Core 3.1 Windows Forms App Project,
I can create Icon Buttons but only few Icons appear.
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.
Could be related to https://stackoverflow.com/questions/31452443/wpf-textblock-memory-leak-when-using-font
@ThomasMentzel @htochenhagen @janbo485
Reproduced by @htochenhagen and @janbo485 in 4.7.1 as well as 5.x
Current version of fontawesome is 5.0.8, cf.: https://fontawesome.com/
Some new icons available. Please update!
Hello, I try to add the controls of the FontAwesome.Sharp library to the visual studio 2015 toolbox, with these steps:
add items to the tab, i.e. Choose Items -> Browse, then select $ (SolutionDir) ./ packages \ FontAwesome.Sharp.5.8.3 \ lib \ net40 \ FontAwesome.Sharp.dll
But I get the following error:
There are no items in '$ (SolutionDir) ... FontAwesome.Sharp.dll' that can be placed in the toolbox.
I get the same error in visual studio 2012-2015-2017-2019.
Although in VS 2017 and 2019 the controls are automatically added to the toolbox after installing from nuget.
How to use animated icons? from https://fontawesome.com/how-to-use/on-the-web/styling/animating-icons
please add regular style font char when icon are available in regular and solid style.
thank you for your great work.
Please see him update:
Update: Though the information and concerns in this blog post are still very true, I’ve actually had a change of heart and I’m now advocating to Start Strong-Naming your Assemblies!!
https://www.pedrolamas.com/2018/09/11/start-strong-naming-your-assemblies/
Also, the absence of a strong signature blocks the distribution of WinForms controls with designers containing icons via NuGet
Temporary alternatives:
Signing NuGet package libs before use:
<ItemGroup>
<PackageReference Include="Brutal.Dev.StrongNameSigner" Version="2.7.1" GeneratePathProperty="true" IncludeAssets="none" />
<PackageReference Include="FontAwesome.Sharp" Version="5.15.3" GeneratePathProperty="true" />
</ItemGroup>
<Target Name="StrongName" BeforeTargets="PrepareForBuild">
<Exec Command=""$(PkgBrutal_Dev_StrongNameSigner)\build\StrongNameSigner.Console.exe" -InputDirectory "$(PkgFontAwesome_Sharp)\lib"" />
</Target>
Or my StrongName NuGet package:
<PackageReference Include="FontAwesome.Sharp.StrongName" Version="5.15.3" />
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.