Skip to content

Commit

Permalink
Global Docs Update
Browse files Browse the repository at this point in the history
  • Loading branch information
AathifMahir committed May 11, 2024
1 parent b95d345 commit 3b08cc7
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ if you came across this issue dotnet/maui#7503 when using new namespace, Make su

```

## Breaking Changes from v2
## Breaking Changes

### Version 1 to 2

`Old (v1)`

Expand All @@ -91,6 +93,11 @@ xmlns:mi="http://www.aathifmahir.com/dotnet/2022/maui/icons"
<mi:MauiIcon Icon="{mi:Material ABC}"/>
```

### 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
Expand Down Expand Up @@ -243,29 +250,6 @@ new MauiIcon().Icon(FluentIcons.Accounts).OnIdioms(new List<string>{"Desktop", "
new MauiIcon().Icon(MaterialIcons.ABC).OnPlatforms(new List<string>{"WinUI", "Android"}).OnIdioms(new List<string>{"Desktop", "Phone"});
```

## Maui Built in OnPlatform and OnIdiom Usage

```xml
<Image>
<Image.Source>
<OnPlatform x:TypeArguments="ImageSource" Default="{mi:FluentFilled Icon=Airplane20Filled, TypeArgument={x:Type ImageSource}}">
<On Platform="MacCatalyst, WinUI"
Value="{mi:Cupertino Icon=Airplane, IconBackgroundColor=Cyan, TypeArgument={x:Type ImageSource}}"/>
</OnPlatform>
</Image.Source>
</Image>

<Image>
<Image.Source>
<OnIdiom Default="{mi:FluentFilled Icon=Airplane20Filled, TypeArgument={x:Type ImageSource}}"
Desktop="{mi:FluentFilled Icon=Airplane20Filled, TypeArgument={x:Type ImageSource}}">
</OnIdiom>
</Image.Source>
</Image>

```
**Disclaimer:** Only **ImageSource** or **FontImageSource** Supports Maui's Built in OnPlatform or OnIdiom and **TypeArgument** Should be Assigned to Work Optimally, Therefore It's Recommended to use MauiIcons Custom OnPlatform and OnIdioms

# Properties

| Parameters | Type | Description |
Expand Down

0 comments on commit 3b08cc7

Please sign in to comment.