# MahApps.Metro.IconPacks
**Repository Path**: chqiuu/MahApps.Metro.IconPacks
## Basic Information
- **Project Name**: MahApps.Metro.IconPacks
- **Description**: Some awesome icons for WPF and UWP all together...
- **Primary Language**: C#
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2019-08-15
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
MahApps.Metro.IconPacks
The `IconPacks` library contains controls to use awesome icons from
- [Material Design](https://materialdesignicons.com/) (v2.4.85 with 2485 icons)
- [Material Design Icons Light](https://github.com/Templarian/MaterialDesignLight) (v0.2.63 with 257 icons)
- [Font Awesome](https://fontawesome.com/) (v5.1.0 with 1264 icons)
- [GitHub Octicons](https://octicons.github.com/) (v7.3.0 with 177 icons)
- [Modern](http://modernuiicons.com/) (1224 icons)
- [Entypo+](http://www.entypo.com/) (411 icons)
- [Simple Icons](https://simpleicons.org/) (v1.3.8 with 412 icons)
for `WPF` and `UWP` apps in a simple way.
It's not necessary to install [MahApps.Metro](https://github.com/MahApps/MahApps.Metro) (for WPF), but it makes your application nicer.

## Want to say thanks?
This framework is free and can be used for free, open source and commercial applications. It's tested and contributed by many people... So mainly hit the :star: button, that's all... thx :squirrel: (:dollar:, :euro:, :beer: or some other gifts are also being accepted...).
## Install
To install the IconPacks, run the following commands in the NuGet Package Manager Console or install it with the NuGet Package Manager extension.
- `MahApps.Metro.IconPacks` includes all Icons in one package [NuGet package](https://www.nuget.org/packages/MahApps.Metro.IconPacks/)
```bash
PM> Install-Package MahApps.Metro.IconPacks
```
- `MahApps.Metro.IconPacks.Material` with this [NuGet package](https://www.nuget.org/packages/MahApps.Metro.IconPacks.Material/)
```bash
PM> Install-Package MahApps.Metro.IconPacks.Material
```
- `MahApps.Metro.IconPacks.MaterialLight` with this [NuGet package](https://www.nuget.org/packages/MahApps.Metro.IconPacks.MaterialLight/)
```bash
PM> Install-Package MahApps.Metro.IconPacks.MaterialLight
```
- `MahApps.Metro.IconPacks.FontAwesome` with this [NuGet package](https://www.nuget.org/packages/MahApps.Metro.IconPacks.FontAwesome/)
```bash
PM> Install-Package MahApps.Metro.IconPacks.FontAwesome
```
- `MahApps.Metro.IconPacks.Octicons` with this [NuGet package](https://www.nuget.org/packages/MahApps.Metro.IconPacks.Octicons/)
```bash
PM> Install-Package MahApps.Metro.IconPacks.Octicons
```
- `MahApps.Metro.IconPacks.Modern` with this [NuGet package](https://www.nuget.org/packages/MahApps.Metro.IconPacks.Modern/)
```bash
PM> Install-Package MahApps.Metro.IconPacks.Modern
```
- `MahApps.Metro.IconPacks.Entypo` with this [NuGet package](https://www.nuget.org/packages/MahApps.Metro.IconPacks.Entypo/)
```bash
PM> Install-Package MahApps.Metro.IconPacks.Entypo
```
- `MahApps.Metro.IconPacks.SimpleIcons` with this [NuGet package](https://www.nuget.org/packages/MahApps.Metro.IconPacks.SimpleIcons/)
```bash
PM> Install-Package MahApps.Metro.IconPacks.SimpleIcons
```
## Usage
If you want all icons together then just install the `MahApps.Metro.IconPacks` NuGet package. You can also only install one of the icon packs if you don't need them all.
```xaml
```
```xaml
```
```xaml
```
```xaml
```
```xaml
```
```xaml
```
```xaml
```
### Namespace
The `Xaml` namespace for all icon packs is:
```xaml
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
```
and for the `UWP` packages:
```xaml
xmlns:iconPacks="using:MahApps.Metro.IconPacks"
```
## IconPacks Browser
If you have no idea which icon you're supposed to take, then you can use the IconPacks Browser. You can search in every IconPacks and copy a raw `Xaml` code snippet to the clipboard.
You can download the latest version of the browser at the [release page](https://github.com/MahApps/MahApps.Metro.IconPacks/releases/latest) (a zipped pre-compiled .NET executable is available).
## WPF Sample
```xaml
```
## UWP Sample
```xaml
```
## MarkupExtension (only for WPF)
A faster way to get a `Button` (or any other `ContentControl`) with an Icon is to use the MarkupExtension(s).
If you want e.g. a Button with an Icon from the `PackIconFontAwesome` then you can do this one:
```xaml
```
It's also possible to change some properties of the icon itself like this:
```xaml
```
It's also possible to use a general (generic) MarkupExtension:
```xaml
```
### Breaking change 1.9.x -> 2.0
The MarkupExtension class names had to be renamed, cause the old ones doesn't worked well with the Visual Studio Designer (#29, #30).
**Before**
```xaml
```
**Now**
```xaml
```
## Properties
| Property | Description |
| --- | --- |
| `Kind` | Gets or sets the icon to display. Each IconPack has it's own icon type and an enumeration for it. |
| `Flip` | Gets or sets the flip orientation. Possible values are `Normal`, `Horizontal`, `Vertical` or `Both` from the enumeration type `PackIconFlipOrientation`. |
| `Rotation` | Gets or sets the rotation (angle) of the inner icon. Possible values are `0`-`360`. |
| `Spin` | Gets or sets a value indicating whether the inner icon is spinning (rotating) (`true` or `false`). |
| `SpinDuration` | Gets or sets the duration of the spinning animation (in seconds). This will also restart the spin animation and works only if `Spin` property is set to `true`. |
| `SpinEasingFunction` | Gets or sets the EasingFunction (`IEasingFunction`) of the spinning animation. This will also restart the spin animation and works only if `Spin` property is set to `true`. |
| `SpinAutoReverse` | Gets or sets the AutoReverse of the spinning animation. This will also restart the spin animation and works only if `Spin` property is set to `true`. |
| `Control.Properties` | All public properties of `Control`, e.g. `Width` and `Height` |
## Custom Styles
Sometimes it's necessary to change some properties for all used icon pack controls. All controls have styles which can be use for global changes or anything else.
For the `MahApps.Metro.IconPacks` you can e.g. create a custom resource dictionary (called here `CustomIconPacksStyles.xaml`) and add it to the `App.xaml` resource tag.
```xaml
```
Here is the resource dictionary content for all IconPacks in this sample (for `CustomIconPacksStyles.xaml`).
```xaml
```
If you use the IconPack with all included icons you can also use this resource dictionary:
```xaml
```
## Strong naming
MahApps.Metro.IconPacks will not be strong-named.
Why?
Strong-named assemblies are only useful in some rare scenarios. If you need strong-named assembly then you can compile the source by yourself ore use the [Strong Namer](https://github.com/dsplaisted/strongnamer) from Daniel Plaisted @dsplaisted or [Strong-Name Signer](https://github.com/brutaldev/StrongNameSigner) from Werner van Deventer @brutaldev.
More informations about the reason of this decision can be found here:
- [Still Strong-Naming your Assemblies? You do know it’s 2016, right?](https://www.pedrolamas.com/2016/03/01/still-strong-naming-your-assemblies-you-do-know-its-2016-right/)
- [XAML Behaviors UWP Managed 1.1.0](https://www.pedrolamas.com/2016/02/23/xaml-behaviors-uwp-managed-1-1-0/)
- [Strong-Named Assemblies](https://docs.microsoft.com/en-us/dotnet/framework/app-domains/strong-named-assemblies)