Material.Icons
2.1.10
dotnet add package Material.Icons --version 2.1.10
NuGet\Install-Package Material.Icons -Version 2.1.10
<PackageReference Include="Material.Icons" Version="2.1.10" />
paket add Material.Icons --version 2.1.10
#r "nuget: Material.Icons, 2.1.10"
// Install Material.Icons as a Cake Addin #addin nuget:?package=Material.Icons&version=2.1.10 // Install Material.Icons as a Cake Tool #tool nuget:?package=Material.Icons&version=2.1.10
Material.Icons
Parsed icons set from materialdesignicons.com and display control implementations for different GUI frameworks.
- All icons are always up-to-date because automatically updated every 6 hours.
- Small package size because icons are graphically encoded via SVG Path.
- Icon types are strongly typed enum, so your IDE will suggest available variants:
Structure
This project consists of 3 parts:
FAQ - frequently asked questions
Community maintained
- contains controls for WinUI/UNO (separate repository)
Avalonia
Getting started
- Install Material.Icons.Avalonia nuget package:
dotnet add package Material.Icons.Avalonia
- Include styles in
App.xaml
(for2.0.0
version and higher):<Application xmlns:materialIcons="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia" ...> <Application.Styles> ... <materialIcons:MaterialIconStyles /> </Application.Styles> </Application>
Using
Add Material.Icons.Avalonia
namespace to the root element of your file (your IDE can suggest it or do it automatically):
xmlns:materialIcons="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.
Also, there is MaterialIconExt
which allows you to use is as the markup extension:
<Button Content="{materialIcons:MaterialIconExt Kind=Abacus}" />
Avalonia FuncUI (F#)
Getting started
- Install Material.Icons.Avalonia nuget package:
dotnet add package Material.Icons.Avalonia
- Import styles in Application (or if you use XAML check instructions for plain Avalonia)
type App() = inherit Application() override this.Initialize() = .. this.Styles.Add(MaterialIconStyles(null)) ..
- Create bindings for
MaterialIcon
namespace Avalonia.FuncUI.DSL [<AutoOpen>] module MaterialIcon = open Material.Icons open Material.Icons.Avalonia open Avalonia.FuncUI.Types open Avalonia.FuncUI.Builder let create (attrs: IAttr<MaterialIcon> list): IView<MaterialIcon> = ViewBuilder.Create<MaterialIcon>(attrs) type MaterialIcon with static member kind<'t when 't :> MaterialIcon>(value: MaterialIconKind) : IAttr<'t> = AttrBuilder<'t>.CreateProperty<MaterialIconKind>(MaterialIcon.KindProperty, value, ValueNone)
- Use
Button.create [ Button.content ( MaterialIcon.create [ MaterialIcon.kind MaterialIconKind.Export ] ) ]
WPF
Getting started
Install Material.Icons.WPF nuget package:
dotnet add package Material.Icons.WPF
Using
Add Material.Icons.WPF
namespace to the 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.
Also, there is MaterialIconExt
which allows you to use is as the markup extension:
<Button Content="{materialIcons:MaterialIconExt Kind=Abacus}" />
Meta
Getting started
Install Material.Icons nuget package:
dotnet add package Material.Icons
Using
Icon types stored in Material.Icons.MaterialIconKind
enum.
We can resolve an icon path by using Material.Icons.MaterialIconDataProvider.GetData()
.
Adding your own icons
Currently, there is no way to add your own icons, as icons are enum and cannot be modified.
But you can override some existing icons to use your own data:
public class CustomIconProvider : MaterialIconDataProvider
{
public override string ProvideData(MaterialIconKind kind)
{
return kind switch
{
MaterialIconKind.TrophyVariant => "some SVG code",
_ => base.ProvideData(kind)
};
}
}
// When your application starts (e.g. in the Main method) replace MaterialIconDataProvider with your own
public static int Main(string[] args)
{
MaterialIconDataProvider.Instance = new CustomIconProvider(); // Settings custom provider
// Application startup code
// return BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
FAQ
How to change icon color?
- Change
Foreground
property.
How to change size?
- If you are using
MaterialIcon
control - useWidth
or/andHeight
properties. - If you are using
MaterialIconExt
- useSize
property.
How to update icons?
- You can manually set
Material.Icons
package version in your project file.
What about versioning policy?
- We use semver.
Any package with identical major and minor versions is compatible.
For example,1.0.0
and1.0.1
are compatible, but1.0.0
and1.1.0
might not be.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Material.Icons:
Package | Downloads |
---|---|
Material.Icons.Avalonia
Avalonia control for display material icons from Material.Icons |
|
Speckle.Material.Icons.Avalonia
Avalonia control for display material icons from Material.Icons |
|
Material.Icons.WPF
WPF control for display material icons from Material.Icons |
|
Material.Icons.UNO
Icones Material Design para UNO e WinUI |
|
Floxel
Toolkit for making WPF applications |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.1.10 | 35,129 | 6/20/2024 |
2.1.9 | 18,082 | 4/4/2024 |
2.1.8 | 350 | 4/1/2024 |
2.1.7 | 135 | 4/1/2024 |
2.1.6 | 1,702 | 1/18/2024 |
2.1.5 | 852 | 1/2/2024 |
2.1.4 | 467 | 12/19/2023 |
2.1.3 | 249 | 12/15/2023 |
2.1.2 | 124 | 12/14/2023 |
2.1.1 | 165 | 12/12/2023 |
2.1.0 | 40,690 | 12/9/2023 |
2.0.18 | 130 | 12/9/2023 |
2.0.17 | 126 | 12/8/2023 |
2.0.16 | 216 | 12/6/2023 |
2.0.15 | 150 | 12/5/2023 |
2.0.14 | 164 | 12/5/2023 |
2.0.13 | 222 | 12/2/2023 |
2.0.12 | 1,396 | 10/25/2023 |
2.0.11 | 1,382 | 8/16/2023 |
2.0.10 | 177 | 8/15/2023 |
2.0.9 | 168 | 8/15/2023 |
2.0.8 | 168 | 8/14/2023 |
2.0.7 | 170 | 8/13/2023 |
2.0.6 | 263 | 8/9/2023 |
2.0.5 | 447 | 7/11/2023 |
2.0.4 | 504 | 6/12/2023 |
2.0.3 | 32,174 | 5/14/2023 |
2.0.2 | 2,086 | 5/10/2023 |
2.0.1 | 185 | 5/9/2023 |
2.0.0 | 6,231 | 5/4/2023 |
2.0.0-preview1.3 | 2,715 | 3/9/2023 |
2.0.0-preview1.2 | 111 | 3/2/2023 |
2.0.0-preview1.1 | 114 | 3/1/2023 |
2.0.0-preview1 | 792 | 1/23/2023 |
1.1.35 | 65,193 | 1/21/2023 |
1.1.34 | 321 | 1/19/2023 |
1.1.33 | 359 | 1/13/2023 |
1.1.32 | 2,517 | 1/4/2023 |
1.1.31 | 353 | 12/30/2022 |
1.1.30 | 333 | 12/29/2022 |
1.1.29 | 318 | 12/28/2022 |
1.1.28 | 326 | 12/27/2022 |
1.1.27 | 330 | 12/23/2022 |
1.1.26 | 334 | 12/22/2022 |
1.1.25 | 745 | 12/19/2022 |
1.1.24 | 323 | 12/19/2022 |
1.1.23 | 317 | 12/15/2022 |
1.1.22 | 409 | 12/5/2022 |
1.1.21 | 338 | 12/5/2022 |
1.1.20 | 396 | 11/21/2022 |
1.1.19 | 1,066 | 10/14/2022 |
1.1.18 | 738 | 10/1/2022 |
1.1.17 | 564 | 9/15/2022 |
1.1.16 | 446 | 9/10/2022 |
1.1.15 | 2,516 | 8/25/2022 |
1.1.14 | 514 | 8/9/2022 |
1.1.13 | 825 | 7/17/2022 |
1.1.12 | 461 | 7/15/2022 |
1.1.11 | 446 | 7/14/2022 |
1.1.10 | 49,652 | 7/12/2022 |
1.1.9 | 458 | 7/9/2022 |
1.1.8 | 470 | 7/6/2022 |
1.1.7 | 488 | 7/1/2022 |
1.1.6 | 531 | 6/23/2022 |
1.1.5 | 473 | 6/23/2022 |
1.1.4 | 450 | 6/22/2022 |
1.1.3 | 475 | 6/16/2022 |
1.1.2 | 452 | 6/15/2022 |
1.1.1 | 432 | 6/14/2022 |
1.1.0 | 904 | 6/9/2022 |
1.0.105 | 534 | 5/26/2022 |
1.0.104 | 461 | 5/26/2022 |
1.0.103 | 452 | 5/25/2022 |
1.0.102 | 434 | 5/25/2022 |
1.0.101 | 453 | 5/21/2022 |
1.0.100 | 429 | 5/20/2022 |
1.0.99 | 480 | 5/17/2022 |
1.0.98 | 449 | 5/16/2022 |
1.0.97 | 491 | 5/7/2022 |
1.0.96 | 456 | 5/6/2022 |
1.0.95 | 460 | 4/27/2022 |
1.0.94 | 624 | 4/5/2022 |
1.0.93 | 458 | 4/3/2022 |
1.0.92 | 458 | 4/2/2022 |
1.0.91 | 477 | 4/2/2022 |
1.0.90 | 476 | 3/30/2022 |
1.0.89 | 460 | 3/30/2022 |
1.0.88 | 472 | 3/26/2022 |
1.0.87 | 453 | 3/25/2022 |
1.0.86 | 446 | 3/25/2022 |
1.0.85 | 457 | 3/24/2022 |
1.0.84 | 459 | 3/24/2022 |
1.0.83 | 597 | 3/21/2022 |
1.0.82 | 462 | 3/21/2022 |
1.0.76 | 680 | 2/8/2022 |
1.0.75 | 497 | 2/1/2022 |
1.0.74 | 497 | 1/29/2022 |
1.0.73 | 498 | 1/25/2022 |
1.0.72 | 487 | 1/24/2022 |
1.0.71 | 476 | 1/23/2022 |
1.0.70 | 486 | 1/22/2022 |
1.0.69 | 462 | 1/22/2022 |
1.0.68 | 1,595 | 1/4/2022 |
1.0.67 | 325 | 12/29/2021 |
1.0.66 | 461 | 12/8/2021 |
1.0.65 | 318 | 12/4/2021 |
1.0.64 | 4,832 | 11/24/2021 |
1.0.63 | 324 | 11/16/2021 |
1.0.62 | 386 | 11/14/2021 |
1.0.61 | 354 | 11/12/2021 |
1.0.60 | 371 | 11/4/2021 |
1.0.59 | 375 | 11/4/2021 |
1.0.58 | 380 | 11/2/2021 |
1.0.57 | 395 | 10/27/2021 |
1.0.56 | 416 | 10/15/2021 |
1.0.55 | 390 | 10/15/2021 |
1.0.54 | 360 | 10/14/2021 |
1.0.53 | 371 | 10/13/2021 |
1.0.52 | 368 | 10/12/2021 |
1.0.51 | 381 | 10/8/2021 |
1.0.50 | 356 | 10/7/2021 |
1.0.49 | 357 | 10/6/2021 |
1.0.48 | 343 | 10/6/2021 |
1.0.47 | 371 | 10/5/2021 |
1.0.46 | 512 | 10/3/2021 |
1.0.45 | 386 | 9/25/2021 |
1.0.44 | 421 | 9/24/2021 |
1.0.43 | 362 | 9/23/2021 |
1.0.42 | 389 | 9/22/2021 |
1.0.41 | 380 | 9/21/2021 |
1.0.40 | 409 | 9/21/2021 |
1.0.39 | 370 | 9/17/2021 |
1.0.38 | 388 | 9/16/2021 |
1.0.37 | 396 | 9/16/2021 |
1.0.36 | 376 | 9/15/2021 |
1.0.35 | 414 | 9/15/2021 |
1.0.34 | 386 | 9/14/2021 |
1.0.33 | 392 | 9/14/2021 |
1.0.32 | 399 | 9/7/2021 |
1.0.31 | 432 | 9/5/2021 |
1.0.30 | 397 | 9/4/2021 |
1.0.29 | 403 | 9/4/2021 |
1.0.28 | 394 | 9/3/2021 |
1.0.27 | 380 | 9/2/2021 |
1.0.26 | 400 | 9/2/2021 |
1.0.25 | 390 | 9/1/2021 |
1.0.24 | 391 | 8/31/2021 |
1.0.23 | 384 | 8/30/2021 |
1.0.22 | 395 | 8/26/2021 |
1.0.21 | 383 | 8/26/2021 |
1.0.20 | 354 | 8/25/2021 |
1.0.19 | 360 | 8/25/2021 |
1.0.18 | 387 | 8/21/2021 |
1.0.17 | 377 | 8/12/2021 |
1.0.16 | 423 | 7/29/2021 |
1.0.15 | 413 | 7/28/2021 |
1.0.14 | 387 | 7/27/2021 |
1.0.13 | 439 | 7/13/2021 |
1.0.12 | 467 | 5/21/2021 |
1.0.11 | 436 | 5/8/2021 |
1.0.10 | 383 | 4/27/2021 |
1.0.9 | 400 | 4/9/2021 |
1.0.8 | 22,945 | 3/20/2021 |
1.0.7 | 413 | 3/9/2021 |
1.0.6 | 410 | 3/6/2021 |
1.0.5 | 412 | 3/5/2021 |
1.0.4 | 549 | 2/12/2021 |
1.0.3 | 424 | 2/9/2021 |
1.0.2 | 29,657 | 2/6/2021 |
1.0.1 | 431 | 2/6/2021 |
1.0.0 | 4,828 | 1/21/2021 |
- Icons set updated according to materialdesignicons.com at Thu, 20 Jun 2024 12:18:52 GMT
Check out changes at https://pictogrammers.com/library/mdi/history/