Jamjardavies / Jamjardavies.Icon.Maui

MIT License
1 stars 0 forks source link

Jamjardavies.Icon.Maui

Readme will be updated soon with more information, below is a quick-start guide.

Using Jamjardavies.Icon.Maui.FontAwesome

First, inside of the MauiProgram.cs file, add UseFontAwesome

return MauiApp.CreateBuilder()
              .UseMauiApp<App>()
              .UseFontAwesome()
              .Build();

Using Jamjardavies.Icon.Maui.Material

First, inside of the MauiProgram.cs file, add UseMaterial

return MauiApp.CreateBuilder()
              .UseMauiApp<App>()
              .UseMaterial()
              .Build();

Xaml

Maui Label

<Label Text="{icon:FontAwesome Spinner}" />

Maui Button

Using ImageSource:

<Button ImageSource="{icon:FontAwesome Facebook}"
        Text="Facebook"
        FontSize="32" />

Using ImageSource and Text:

<Button ImageSource="{icon:FontAwesome Facebook}"
        Text="{icon:FontAwesome Facebook}"
        FontSize="32" />

IconLabel

<icon:IconLabel Margin="16"
                Icon="{icon:FontAwesome Spinner}" 
                Spin="True"
                SpinDuration="4"
                HorizontalOptions="Center"
                FontSize="48" />

IconButton

<icon:IconButton Icon="{icon:FontAwesome Facebook}"
                 IconSize="32"
                 Text="Facebook" />