.NET 有图标集合吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4142203/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Does .NET have icon collections?
提问by Louis Rhys
Does .NET framework have a collection of icons for use in Windows Forms or WPF application somewhere? How does one use it? For example, how do I use it as an application window icon?
.NET 框架是否有一组用于 Windows 窗体或 WPF 应用程序的图标?如何使用它?例如,如何将其用作应用程序窗口图标?
I recall, if you want to display a message box there is a choice to show different icons, I suppose there are more icons in the framework?
我记得,如果你想显示一个消息框,可以选择显示不同的图标,我想框架中有更多的图标?
回答by Cody Gray
If you're using a full edition (not Express) of Visual Studio, an image library is included for you to use freely in your applications (including commercial products!). The primary advantage of using icons from this library is that they are very similar or identical to those that are used in Windows and other Microsoft products, such as Office and Visual Studio, so your users will find them very familiar. This library includes images, icons, and animations and is installed on your computer when you install Visual Studio. For example, if you're using VS 2010, the image library is located here:
如果您使用的是 Visual Studio 的完整版(不是 Express),则包含一个图像库供您在应用程序(包括商业产品!)中自由使用。使用此库中的图标的主要优点是它们与 Windows 和其他 Microsoft 产品(如 Office 和 Visual Studio)中使用的图标非常相似或相同,因此您的用户会发现它们非常熟悉。此库包括图像、图标和动画,并在您安装 Visual Studio 时安装在您的计算机上。例如,如果您使用的是 VS 2010,则图像库位于此处:
..\Program Files\Microsoft Visual Studio 10.0\Common7\VS2010ImageLibrary\1033
..\Program Files\Microsoft Visual Studio 10.0\Common7\VS2010ImageLibrary\1033
To use the files, you first need to extract them from the zip file.
要使用这些文件,您首先需要从 zip 文件中提取它们。
See this entryon th Visual Studio Team Blog site for more information. As the page explains, the one caveat to using the images is that they must be consistent with their specified usage ("In other words, don't use the 'Cut' image for a 'Copy' command."), but this really just makes sense.
有关详细信息,请参阅Visual Studio 团队博客站点上的此条目。正如页面所解释的那样,使用图像的一个警告是它们必须与其指定的用法一致(“换句话说,不要将“剪切”图像用于“复制”命令。”),但这确实是只是有道理。
If you can't find the icons you're looking for included with Visual Studio's image library, there are plenty of free icon packs available on the Internet. Several of the other posts mention their picks, but I'm a huge fan of Fugue Icons. Similar to the Silk icons, they're free for use in your applications as long as you provide attribution. Otherwise, you can purchase a royalty-free license for a very reasonable price.
如果在 Visual Studio 的图像库中找不到您要查找的图标,则 Internet 上有大量免费图标包可用。其他几个帖子提到了他们的选择,但我是Fugue Icons 的忠实粉丝。与 Silk 图标类似,只要您提供署名,它们就可以在您的应用程序中免费使用。否则,您可以以非常合理的价格购买免版税许可。
If you have money to spend, GlyFXsells high quality icons and graphics, many of which have a similar style as those found in Windows or other Microsoft products.
如果您有钱花,GlyFX 会出售高质量的图标和图形,其中许多与 Windows 或其他 Microsoft 产品中的样式相似。
And finally, if you're just looking for a particular icon, you can use one of these free icon search engines:
最后,如果您只是在寻找特定的图标,您可以使用以下免费图标搜索引擎之一:
回答by VoteCoffee
The library is no longer included beginning with VisualStudio 2012. You can download here though: http://www.microsoft.com/en-us/download/details.aspx?id=35825
从 VisualStudio 2012 开始不再包含该库。您可以在此处下载:http: //www.microsoft.com/en-us/download/details.aspx?id=35825
They updated it for 2019 in early February 2020. Content is similar across releases, so you only need to download the latest release.
他们在 2020 年 2 月上旬为 2019 年更新了它。不同版本的内容相似,因此您只需下载最新版本。
The 2019 release has 10.3 MB of content and 4085 icon types (SVG/PNG/XAML). This release got rid of many BMP icons, as well as the size variations used for overlays when making custom icons (SM/MD). It also added some handy icons (CloseAll, Trash, AlignCenter, AlignMiddle, SkipFile, SmartFilter, Sort, StatusReady, Target, UserGroup). It changed folder name conventions (such as AddRowToAbove became AddToRowAbove, column icons such as 1x and 2Columns became verbose such as TableColumn and SecondOfFourColumns, Silverlight/Azure prefixes were removed). The Save icon folder has 33 versions which together are 19.8KB, due to removed BMP and SM/MD types.
2019 版本有 10.3 MB 的内容和 4085 种图标类型 (SVG/PNG/XAML)。此版本摆脱了许多 BMP 图标,以及制作自定义图标 (SM/MD) 时用于覆盖的大小变化。它还添加了一些方便的图标(CloseAll、Trash、AlignCenter、AlignMiddle、SkipFile、SmartFilter、Sort、StatusReady、Target、UserGroup)。它更改了文件夹名称约定(例如 AddRowToAbove 变成了 AddToRowAbove,列图标(例如 1x 和 2Columns)变得冗长,例如 TableColumn 和 SecondOfFourColumns,Silverlight/Azure 前缀被删除)。由于删除了 BMP 和 SM/MD 类型,Save icon 文件夹有 33 个版本,总共 19.8KB。
The 2017 release has 12.5 MB of content and 4013 icon types (BMP/SVG/PNG/XAML). This release largely abandoned the Adobe Illustrator (.ai) file type. Icons are still sorted into folders for the individual icon types that contain the different formats. Some icons have various size/resolution versions in each format up to 256x256 size and 32bit pixel depth. Most icons have different flavors such as grey/inverse/thin/thingrey/small/medium. For example, the Save icon folder has 40 versions which together are 24.9KB. The absence of the archive folder, the 2010 legacy icons, and the Adobe Illustrator (.ai) icons together makes this release nice and compact again.
2017 版本有 12.5 MB 的内容和 4013 种图标类型 (BMP/SVG/PNG/XAML)。此版本在很大程度上放弃了 Adobe Illustrator (.ai) 文件类型。图标仍然分类到包含不同格式的各个图标类型的文件夹中。某些图标在每种格式中具有各种大小/分辨率版本,最大为 256x256 大小和 32 位像素深度。大多数图标有不同的风格,例如灰色/反色/薄/东西/小/中。例如,保存图标文件夹有 40 个版本,总共 24.9KB。没有存档文件夹、2010 年的旧图标和 Adobe Illustrator (.ai) 图标使这个版本再次变得漂亮和紧凑。
The 2015 release has 2.9 GB of content and 4222 icon types (AI/BMP/SVG/PNG/XAML). This release started offering multiple flavors of each icon type such as grey/inverse/thin/thingrey/small/medium. Icons are now sorted into folders for the individual icon types that contain the different formats and flavors. Some icons have various size/resolution versions in each format up to 256x256 size and 32bit pixel depth. The Adobe Illustrator (.ai) file type adds most of the bulk to this release. For example the Save icon folder has 84 versions which together are 5.84MB, and the .ai files are 5.69MB of this.
2015 版本有 2.9 GB 的内容和 4222 种图标类型 (AI/BMP/SVG/PNG/XAML)。此版本开始提供每种图标类型的多种风格,例如灰色/反色/薄/thingrey/小/中。图标现在分类到包含不同格式和风格的各个图标类型的文件夹中。某些图标在每种格式中具有各种大小/分辨率版本,最大为 256x256 大小和 32 位像素深度。Adobe Illustrator (.ai) 文件类型在此版本中添加了大部分内容。例如,保存图标文件夹有 84 个版本,总共 5.84MB,而 .ai 文件是其中的 5.69MB。
The 2013 release has 285.6 MB of content and 2793 icon types (BMP/ICO/PNG/XAML). Icons were sorted by function group, then by image type (726 action, 1494 concept, 753 objects as counter by png). It also has 788 legacy icons for VS2010 and an archive folder with 2010 and 2012 icons. This release started offering multiple flavors of each icon type.
2013 版本有 285.6 MB 的内容和 2793 种图标类型 (BMP/ICO/PNG/XAML)。图标按功能组排序,然后按图像类型(726 个动作,1494 个概念,753 个对象作为计数器按 png)。它还有 788 个 VS2010 的旧图标和一个包含 2010 和 2012 图标的存档文件夹。此版本开始提供每种图标类型的多种风格。
The 2012 release has 19.4 MB of content and 2658 icon types (BMP/ICO/PNG/XAML). Icons were sorted by function group, then by image type (1093 common, 722 action, 91 annotation, 752 objects as counted by PNG type). Most icons available as 16x16 size and 32bit pixel depth.
2012 版本有 19.4 MB 的内容和 2658 种图标类型 (BMP/ICO/PNG/XAML)。图标按功能组排序,然后按图像类型(1093 个常用、722 个动作、91 个注释、752 个对象按 PNG 类型计数)。大多数图标可用 16x16 大小和 32 位像素深度。
回答by vc 74
I use famfamfam's Silk Iconsin several applications and really like them (they're free but you have to mention you're using them in your app + of course you can donate).
我在几个应用程序中使用 famfamfam 的Silk Icons并且非常喜欢它们(它们是免费的,但你必须提到你在你的应用程序中使用它们 + 当然你可以捐赠)。


回答by Mitch Wheat
If you have Visual Studio (not Express) then you have access to many of the windows icons:
如果您有 Visual Studio(不是 Express),那么您可以访问许多 Windows 图标:
The Visual Studio 2010 Image Library contains application images that appear in Microsoft Windows, the Office system, Microsoft Visual Studio, and other Microsoft software. You can use this set of over 1,000 images to create applications that look visually consistent with Microsoft software.
This file is typically installed in ..\Program Files\Microsoft Visual Studio 10.0\Common7\VS2010ImageLibrary\1033.
Visual Studio 2010 图像库包含出现在 Microsoft Windows、Office 系统、Microsoft Visual Studio 和其他 Microsoft 软件中的应用程序图像。您可以使用这组超过 1,000 个图像来创建在视觉上与 Microsoft 软件一致的应用程序。
此文件通常安装在 ..\Program Files\Microsoft Visual Studio 10.0\Common7\VS2010ImageLibrary\1033 中。
Ref.: Visual Studio Image Library
How to: Install the Visual Studio Image Library
Licensing is talked about here: Tips and Tricks: Visual Studio 2010 Image Library
此处讨论许可:提示和技巧:Visual Studio 2010 图像库
回答by Bastianon Massimo
For XAML icons check these links:
http://www.thexamlproject.com/http://modernuiicons.com/
对于 XAML 图标,请检查以下链接:http:
//www.thexamlproject.com/http://modernuiicons.com/
edit:
编辑:
the best one: https://materialdesignicons.com/
最好的一个:https: //materialdesignicons.com/
回答by Jason Williams
AFAIK there isn't a collection of pre-built icons - but there a millions of high quality icons available on the web if you just search for them.
AFAIK 没有预先构建的图标集合 - 但如果您只是搜索它们,网络上就有数百万个高质量图标可用。
Once you have an icon (.ico) file, you can add it to your project resources. Just open the Resources.resx file, and at the top switch it to view Icons, and then "Add existing file..."
拥有图标 (.ico) 文件后,您可以将其添加到项目资源中。只需打开 Resources.resx 文件,在顶部切换到查看图标,然后“添加现有文件...”
Then, to set the application icon, get Properties on your Project and in the Application tab (at the bottom) choose the icon in the drop-down box.
然后,要设置应用程序图标,请在您的项目中获取属性,然后在应用程序选项卡(底部)中选择下拉框中的图标。
For any Form, set this.Icon = Resources.IconName;to use it as the Form's icon.
对于任何表单,设置this.Icon = Resources.IconName;为将其用作表单的图标。
回答by Lorenz Lo Sauer
In addition to the great recommendations, you could use the glyphIconsSet, which is well suited for the currently popular Flat and puristic Designs. Include them in in your *.resx, and load them (presuming you are using C#):
除了很好的推荐之外,您还可以使用glyphIconsSet,它非常适合当前流行的扁平和纯粹的设计。将它们包含在您的 *.resx 中,并加载它们(假设您使用的是 C#):
System.ComponentModel.ComponentResourceManager resources =
new System.ComponentModel.ComponentResourceManager(typeof(MyForm));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("statusnormalorsmthg.Icon")));
or, by directly reading the Resources:
或者,通过直接阅读资源:
this.Icon = new Icon("Resources/statusnormalorsmthg.ico");
回答by Eric Schneider
I could not find the image library on my machine. I don't think it's include with the install.
我在我的机器上找不到图像库。我不认为它包含在安装中。
I did find a link to download all the collections:
我确实找到了下载所有收藏的链接:
https://www.microsoft.com/en-us/download/details.aspx?id=35825
https://www.microsoft.com/en-us/download/details.aspx?id=35825
回答by OMR
Use the metro package ... it has various icons that suit for almost every thing ... it's free and you can color it and control it in any way you want ... https://github.com/MahApps/MahApps.Metro.IconPacks
使用 Metro 包......它有各种图标,几乎适合所有东西......它是免费的,你可以用任何你想要的方式给它着色和控制它...... https://github.com/MahApps/MahApps。 Metro.IconPacks
回答by Saif Khan
Use an ImageList control to store your icons or Managed Resources file.
使用 ImageList 控件来存储您的图标或托管资源文件。

