Maui-Material.Components.Maui

[删除(380066935@qq.com或微信通知)]

yiszza/Material.Components.Maui (github.com)

Material.Components.Maui

Getting Started

  • Clone this repo and ref it to your maui project
  • Add UseMaterialComponents in your "MauiProgram.cs"
using Material.Components.Maui.Extensions;

namespace SampleApp;
public static class MauiProgram
{
    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();
        builder
            .UseMauiApp<App>()
            .UseMaterialComponents(new List<string>
            {
                //generally, we needs add 6 types of font families
                "xxx-Regular.ttf",
                "xxx-Italic.ttf",
                "xxx-Medium.ttf",
                "xxx-MediumItalic.ttf",
                "xxx-Bold.ttf",
                "xxx-BoldItalic.ttf",
            });
        return builder.Build();
    }
}
  • Add Material colors&styles in your "App.xaml"
<?xml version="1.0" encoding="UTF-8" ?>
<Application
    x:Class="SampleApp.App"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:local="clr-namespace:SampleApp"
    xmlns:mds="clr-namespace:Material.Components.Maui.Styles;assembly=Material.Components.Maui">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources/Styles/Colors.xaml" />
                <ResourceDictionary Source="Resources/Styles/Styles.xaml" />
                <mds:MaterialStyles />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
  • Let's go

The available controls

😄: ready 🤔: unverified 😭: needs help

controlandroidwindowsios&mac
button😄😄🤔
IconButton😄😄🤔
Card😄😄🤔
CheckBox😄😄🤔
Chip😄😄🤔
ComboBox😄😄😭
FAB😄😄🤔
Label😄😄🤔
NavigationBar😄😄🤔
RadioButton😄😄🤔
Switch😄😄🤔