Skip to content

Commit

Permalink
Docs Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AathifMahir committed Sep 25, 2024
1 parent c7d6587 commit d0af832
Showing 1 changed file with 38 additions and 3 deletions.
41 changes: 38 additions & 3 deletions src/MauiIcons.Fluent/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,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)
- [C# Markup Usage](#c-markup-usage)
- [Applying Icon To Text or Placeholder](#applying-icon-to-text-or-placeholder)
- [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)
- [License](#license)


# Usage


Expand All @@ -37,6 +56,19 @@ xmlns:mi="http://www.aathifmahir.com/dotnet/2022/maui/icons"
using MauiIcons.Fluent;
```

# 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
Expand Down Expand Up @@ -102,7 +134,7 @@ new SearchBar().Icon(FluentIcons.AppFolder48, targetName: "Placeholder");

**Disclaimer:** It's important to note that we are Overriding Font on Input Control to Set the Icon that Could Cause Unexpected Behaviors and Rendering Issues as well.

## Custom OnPlatform and OnIdiom Usage
## OnPlatform and OnIdiom Usage
`Xaml`

```xml
Expand Down Expand Up @@ -160,14 +192,17 @@ new MauiIcon().Icon(FluentIcons.AppFolder48).OnPlatforms(new List<string>{"WinUI
<mi:MauiIcon Value="{mi:Fluent AppFolder48}"/>
```

**Disclaimer**: The Old `IconProperty` is still Supported and can be used in Xaml not C#, but it's recommended to use the new `ValueProperty` Since it could be cause of a Performance Penanlty
**Disclaimer**: The Old `IconProperty` is still Supported and can be used in Xaml not C#, but it's recommended to use the new `ValueProperty` Since it could be cause of a Little Bit of Performance Penalty and Confusion

---

### 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 **TypeArgument** and Built in OnPlatform and OnIdiom Support, Use MauiIcons Integrated [OnPlatform and OnIdioms Feature](#onplatform-and-onidiom-usage)
- Removal of **Dotnet 7** Support

---

### Version 1 to 2

`Old (v1)`
Expand Down

0 comments on commit d0af832

Please sign in to comment.