diff --git a/README.md b/README.md index de77b54f..780e2db6 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,25 @@ public static class MauiProgram } ``` +# Table of Contents + +- [Usage](#usage) +- [Advanced Settings](#advanced-settings) +- [New Changes in v4](#new-changes-in-v4) +- [Workaround (Must Read)](#workaround) +- [Built in Control Usage](#built-in-control-usage) +- [Xaml Extension Usage](#xaml-extension-usage) +- [Data Binding Usage](#data-binding-usage) +- [C# Markup Usage](#c-markup-usage) +- [OnPlatform and OnIdiom Usage](#onplatform-and-onidiom-usage) +- [Breaking Changes](#breaking-changes) + - [Version 3 to 4](#version-3-to-4) + - [Version 2 to 3](#version-2-to-3) + - [Version 1 to 2](#version-1-to-2) +- [Advanced Usage](#advanced-usage) +- [Contribute](#contribute) +- [License](#license) + # Usage In order to make use of the **.Net Maui Icons** you can use the below namespace: @@ -52,6 +71,19 @@ In order to make use of the **.Net Maui Icons** you can use the below namespace: xmlns:mi="http://www.aathifmahir.com/dotnet/2022/maui/icons" ``` +# Advanced Settings + +You can set the default icon size, font override, and default font auto-scaling using the `UseMauiIconsCore` builder extension as follows: + +```csharp +builder.UseMauiIconsCore(x => +{ + x.SetDefaultIconSize(30.0); + x.SetDefaultFontOverride(true); + x.SetDefaultFontAutoScaling(true); +}) +``` + ## Workaround if you came across this issue dotnet/maui#7503 when using new namespace, Make sure to create an discarded instance of MauiIcon in the codebehind like below @@ -67,47 +99,6 @@ if you came across this issue dotnet/maui#7503 when using new namespace, Make su ``` -## Breaking Changes - -### Version 1 to 2 - -`Old (v1)` - -```xml -xmlns:cupertino="clr-namespace:MauiIcons.Cupertino;assembly=MauiIcons.Cupertino" -xmlns:fluent="clr-namespace:MauiIcons.Fluent;assembly=MauiIcons.Fluent" -xmlns:material="clr-namespace:MauiIcons.Material;assembly=MauiIcons.Material" - - - - -``` - -`New (v2)` - -```xml -xmlns:mi="http://www.aathifmahir.com/dotnet/2022/maui/icons" - - - - -``` - -### Version 2 to 3 - - - Removal of **TypeArgument** and Built in OnPlatform and OnIdiom Support, Use MauiIcons Integrated [Custom OnPlatform and OnIdioms Feature](#custom-onplatform-and-onidiom-usage) - - Removal of **Dotnet 7** Support - -### Nuget Package Changes - -- **`AathifMahir.Maui.MauiIcons.Material`** doesn't contain all the Variants anymore, Now only contains **Regular version** of Material Icons. Other Variants Decoupled into Seperate Packages Like Below - - [`AathifMahir.Maui.MauiIcons.Material.Outlined`](https://www.nuget.org/packages/AathifMahir.Maui.MauiIcons.Material.Outlined/) - - [`AathifMahir.Maui.MauiIcons.Material.Rounded`](https://www.nuget.org/packages/AathifMahir.Maui.MauiIcons.Material.Rounded/) - - [`AathifMahir.Maui.MauiIcons.Material.Sharp`](https://www.nuget.org/packages/AathifMahir.Maui.MauiIcons.Material.Sharp/) - -- **`AathifMahir.Maui.MauiIcons.FluentFilled`** is Depcrecated and Replaced by [`AathifMahir.Maui.MauiIcons.Fluent.Filled`](https://www.nuget.org/packages/AathifMahir.Maui.MauiIcons.Fluent.Filled/) - - ## Built in Control Usage `Xaml` @@ -132,20 +123,20 @@ new MauiIcon().Icon(MaterialIcons.ABC).IconColor(Colors.Violet); ## Xaml Extension Usage ```xml - + -