https://www.youtube.com/watch?v=D49z8m4DelQ
Mahapps - IconPacks Tutorial
깃허브 주소 : https://github.com/MahApps/MahApps.Metro.IconPacks/wiki
Install, Usage
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
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>
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" />
<iconPacks:PackIconControl Kind="{x:Static iconPacks:PackIconMaterialKind.AccessPoint}" Width="24" Height="24" />
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>
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>
'개발자 > WPF(C#) UI' 카테고리의 다른 글
C# WPF MVVM 패턴 활용하기 (0) | 2020.03.22 |
---|---|
C# WPF Window 새창 띄우기, 창 간에 데이터 넘기기 (0) | 2020.03.22 |
VS2017 WPF 이벤트핸들러 클릭으로 자동 넘어가기 (0) | 2020.03.21 |
C# :: byte[] -> 구조체 , 구조체 -> byte(바이트배열 구조체간 할당) (0) | 2020.03.19 |
[C#/WPF] 버튼 처리 꿀팁 Dispatcher 클래스 : Invoke 메소드를 사용해 크로스 스레드(Cross Thread) 처리하기 (1) | 2020.03.19 |