Usage - MahApps/MahApps.Metro.IconPacks GitHub Wiki

If you want to use all icons together then just install the MahApps.Metro.IconPacks NuGet package, or one of the separate NuGet packages.

Namespace

The Xaml namespace for all is:

xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"

and for the UWP:

xmlns:iconPacks="using:MahApps.Metro.IconPacks"

PackIcon controls

The PackIcon controls are the main featured controls to use an icon in a simple way.

<StackPanel Orientation="Horizontal">
    <iconPacks:PackIconBoxIcons Kind="LogosApple" />
    <iconPacks:PackIconEntypo Kind="Adjust" />
    <iconPacks:PackIconEvaIcons Kind="AlertTriangleOutline" />
    <iconPacks:PackIconFeatherIcons Kind="AlertTriangle" />
    <iconPacks:PackIconFontAwesome Kind="AddressBookRegular" />
    <iconPacks:PackIconIonicons Kind="AnalyticsiOS" />
    <iconPacks:PackIconJamIcons Kind="Anchor" />
    <iconPacks:PackIconMaterial Kind="AccessPoint" />
    <iconPacks:PackIconMaterialDesign Kind="AccessAlarm" />
    <iconPacks:PackIconMaterialLight Kind="Alarm" />
    <iconPacks:PackIconMicrons Kind="Audio" />
    <iconPacks:PackIconModern Kind="Alert" />
    <iconPacks:PackIconOcticons Kind="Archive" />
    <iconPacks:PackIconPicolIcons Kind="Accept" />
    <iconPacks:PackIconRPGAwesome Kind="AlienFire" />
    <iconPacks:PackIconSimpleIcons Kind="AdobeCreativeCloud" />
    <iconPacks:PackIconTypicons Kind="Anchor" />
    <iconPacks:PackIconUnicons Kind="AccessibleIconAlt" />
    <iconPacks:PackIconWeatherIcons Kind="DayCloudy" />
    <iconPacks:PackIconZondicons Kind="Anchor" />
</StackPanel>

2019-12-18_09h20_23

PackIconControl (WPF only)

There is also a common PackIconControl for all IconPacks available (WPF only). This control is only available with the MahApps.Metro.IconPacks NuGet package.

So you can now simply use any icon from the collections with this control.

<iconPacks:PackIconControl Kind="{x:Static iconPacks:PackIconBoxIconsKind.LogosAirbnb}"
                           Width="24"
                           Height="24" />

2019-12-16_16h01_40

<iconPacks:PackIconControl Kind="{x:Static iconPacks:PackIconMaterialKind.AccessPoint}"
                           Width="24"
                           Height="24" />

2019-12-16_16h03_48

WPF Sample

<Window x:Class="IconPacksTest.App"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
        Title="IconPacks" Height="300" Width="300">

   <Grid>
     <iconPacks:PackIconMaterial Kind="EmoticonCool"
                                 VerticalAlignment="Center"
                                 HorizontalAlignment="Center" />
   </Grid>

</Window>

2019-12-16_16h09_13

UWP Sample

<Page x:Class="MahApps.Metro.IconPacks.Test.App.MainPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:iconPacks="using:MahApps.Metro.IconPacks"
      mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <iconPacks:PackIconFontAwesome Width="32"
                                       Height="32"
                                       HorizontalAlignment="Center"
                                       VerticalAlignment="Center"
                                       Kind="AddressBookRegular" />
    </Grid>

</Page>

2019-12-16_16h09_38

⚠️ **GitHub.com Fallback** ⚠️