Parsed icons set from materialdesignicons.com and display control implementations for different GUI frameworks. All information about icons is stored in text form and is automatically generated every time Material.Icons is built. Icons are graphically encoded via SVG Path.
Install Material.Icons nuget package:
dotnet add package Material.Icons
Icon types stored in MaterialIconKind
enum.
We can access icon paths by using MaterialIconDataFactory.DataSetCreate()
.
We can access icons meta info by using MaterialIconDataFactory.InstanceSetCreate()
.
Install Material.Icons.WPF nuget package:
dotnet add package Material.Icons.WPF
Add Material.Icons.WPF
namespace to root element of your file (your IDE can suggest it or do it automatically):
xmlns:materialIcons="clr-namespace:Material.Icons.WPF;assembly=Material.Icons.WPF"
Use MaterialIcon
control:
<materialIcons:MaterialIcon Kind="Abacus" />
The Foreground
property controls the color of the icon.
- Install Material.Icons.Avalonia nuget package:
dotnet add package Material.Icons.Avalonia
- Include styles in
App.xaml
<Application ...> <Application.Styles> ... <StyleInclude Source="avares://Material.Icons.Avalonia/App.xaml" /> </Application.Styles> </Application>
Add Material.Icons.Avalonia
namespace to root element of your file (your IDE can suggest it or do it automatically):
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
Use MaterialIcon
control:
<materialIcons:MaterialIcon Kind="Abacus" />
The Foreground
property controls the color of the icon.