Skip to content
PigeonMaster edited this page Feb 2, 2021 · 3 revisions

Welcome to the Material.Avalonia Wiki!

Getting started

The way to getting started with our styles library is pretty easy and very similar like MDIX and Mahapps.Metro.

  • First step is create AvaloniaUI Application
  • After that you can download our library from NuGet (Install-Package Material.Avalonia), or build our dev-branch for try pre-release updates.

Do not forgot add references Material.Styles, Material.Colors and Material.Ripple to your new project if you want to use dev-branch prerelease.

  • Edit your App.xaml (or App.axaml) to following:
<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:themes="clr-namespace:Material.Styles.Themes;assembly=Material.Styles"
             x:Class="Your.Avalonia.Application.App">
    <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>
  • Modify your MainWindow.xaml (or MainWindow.axaml) to following
<Window ...
        xmlns:styles="clr-namespace:Material.Styles;assembly=Material.Styles"
        ...>
    <StackPanel>
        <styles:Card Margin="16">
            <TextBlock Classes="Headline6" Text="Hello world with Material.Avalonia!"/>
        </styles:Card>
    </StackPanel>
</Window>
  • Run your application by press F5.

Your application will appear an Window to following:

Hello-World-Window

Material.Avalonia Wiki pages is still WIP (work in progress), Pages could not ready for show if they unclickable.

Main section

Widgets / Controls

Theming

Builders

Assist for widgets

Clone this wiki locally