/Material.Avalonia

Material design in AvaloniaUI

Primary LanguageC#MIT LicenseMIT

Material.Avalonia

Customizable Material Design implementation for AvaloniaUI framework.

Overview

This library is a collection of styles and controls to help you customize your Avalonia application with Material Design theme.

  • Material Design styles for almost all Avalonia controls
  • Additional controls to support the Snackbars, side sheets, floating buttons, cards, dialogs and more
  • Easy configuration of palette (at design and runtime), according to Material Guidelines guidelines
  • Full Material Design Icons icon pack support (must be installed separately, in favor of small library size)
  • Demo applications included in the source project

Nuget.Material.Avalonia Nuget.Material.Avalonia Nuget.Material.Avalonia

Getting started

Check out the getting started wiki page. Or follow these very quick instructions:

  1. Add Material.Avalonia nuget package to your project:

    dotnet add package Material.Avalonia

    Nuget.Material.Avalonia Nuget.Material.Avalonia

  2. Edit App.xaml file:

    If you install 3.0.0-* version or higher, use this:

    <Application ...
      xmlns:themes="clr-namespace:Material.Styles.Themes;assembly=Material.Styles"
      ...>
      <Application.Styles>
        <themes:MaterialTheme BaseTheme="Dark" PrimaryColor="Purple" SecondaryColor="Lime" />
      </Application.Styles>
    </Application>

    If you install 2.5.1 or lower, use this:

    <Application ...
      xmlns:themes="clr-namespace:Material.Styles.Themes;assembly=Material.Styles"
      ...>
      <Application.Resources>
        <themes:BundledTheme BaseTheme="Light" PrimaryColor="Teal" SecondaryColor="Amber"/>
      </Application.Resources>
      <Application.Styles>
        <StyleInclude Source="avares://Material.Avalonia/Material.Avalonia.Templates.xaml" />
      </Application.Styles>
    </Application>
  3. Installing additional packages:

    All styles will be included automatically if you using MaterialTheme

    • If you want to use DataGrid control, add Material.Avalonia.DataGrid package:

      dotnet add package Material.Avalonia.DataGrid

      Nuget.Material.Avalonia.DataGrid Nuget.Material.Avalonia.DataGrid

    • If you want to use dialogs provided from Material.Avalonia, add Material.Avalonia.Dialogs package:

      dotnet add package Material.Avalonia.Dialogs

      Nuget.Material.Avalonia.Dialogs Nuget.Material.Avalonia.Dialogs

Useful links