AathifMahir.Maui.MauiIcons.SegoeFluent
4.0.0
Prefix Reserved
dotnet add package AathifMahir.Maui.MauiIcons.SegoeFluent --version 4.0.0
NuGet\Install-Package AathifMahir.Maui.MauiIcons.SegoeFluent -Version 4.0.0
<PackageReference Include="AathifMahir.Maui.MauiIcons.SegoeFluent" Version="4.0.0" />
paket add AathifMahir.Maui.MauiIcons.SegoeFluent --version 4.0.0
#r "nuget: AathifMahir.Maui.MauiIcons.SegoeFluent, 4.0.0"
// Install AathifMahir.Maui.MauiIcons.SegoeFluent as a Cake Addin #addin nuget:?package=AathifMahir.Maui.MauiIcons.SegoeFluent&version=4.0.0 // Install AathifMahir.Maui.MauiIcons.SegoeFluent as a Cake Tool #tool nuget:?package=AathifMahir.Maui.MauiIcons.SegoeFluent&version=4.0.0
.Net Maui Icons
The .NET MAUI Icons - Segoe Fluent library serves as a lightweight icon library, addressing icon and font icon management in .NET MAUI by offering controls that utilize the Windows version of the Segoe Fluent Icon Collection, seamlessly integrated into the library. Check out the Repository for Docs
Get Started
In order to use the .Net Maui Icons - Segoe Fluent you need to call the extension method in your MauiProgram.cs
file as follows:
using MauiIcons.SegoeFluent;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
// Initialise the .Net Maui Icons - SegoeFluent
builder.UseMauiApp<App>().UseSegoeFluentMauiIcons();
}
}
Table of Contents
- Usage
- Advanced Settings
- New Changes in v4
- Workaround (Must Read)
- Built in Control Usage
- Xaml Extension Usage
- C# Markup Usage
- Applying Icon To Text or Placeholder
- OnPlatform and OnIdiom Usage
- Breaking Changes
- Advanced Usage
- License
- Contribute
Usage
In order to make use of the .Net Maui Icons - Segoe Fluent you can use the below namespace:
Xaml
xmlns:mi="http://www.aathifmahir.com/dotnet/2022/maui/icons"
C#
using MauiIcons.SegoeFluent;
Advanced Settings
You can set the default icon size, font override, and default font auto-scaling using the UseMauiIconsCore
builder extension as follows:
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
public MainPage()
{
InitializeComponent();
// Temporary Workaround for url styled namespace in xaml
_ = new MauiIcon();
}
Built in Control Usage
Xaml
<mi:MauiIcon Icon="{mi:SegoeFluent Mail}"/>
C#
new MauiIcon() {Icon = SegoeFluent.GlobalNavButton, IconColor = Colors.Green};
new MauiIcon().Icon(SegoeFluentIcons.People).IconColor(Colors.Purple);
All the Properties and Features of Built in Control, Check Here
Xaml Extension Usage
<Image Aspect="Center" mi.MauiIcon.Value="{mi:SegoeFluent Icon=People}"/>
<Button mi.MauiIcon.Value="{mi:SegoeFluent Icon=Mail}"/>
<ImageButton mi.MauiIcon.Value="{mi:SegoeFluent Icon=Share}"/>
C# Markup Usage
new ImageButton().Icon(SegoeFluentIcons.People),
new Image().Icon(SegoeFluentIcons.Mail),
new Button().Icon(SegoeFluentIcons.Share).IconSize(40.0).IconColor(Colors.Red)
Disclaimer: It's important to note that not all controls are compatible with C# markup. We have conducted tests with the following controls in the current release: Label, Image, ImageButton, SearchBar, Editor, and Entry. Additionally, the native MauiIcon control, when combined with C# markup, can prove to be quite versatile and offer extra features for various scenarios.
Applying Icon To Text or Placeholder
Controls that Supports Placeholder, Can Assign the Icon To PlaceHolder or Text,
Defaults to Placeholder but can be set to Text by Setting TargetName Parameter to Text
xaml
<Entry mi:MauiIcon.Value="{mi:SegoeFluent Icon=Share, TargetName='Text'}"/>
<SearchBar mi:MauiIcon.Value="{mi:SegoeFluent Icon=Mail, TargetName='Placeholder'}"/>
c#
new Entry().Icon(SegoeFluentIcons.Share, targetName: "Text").IconSize(20.0).IconColor(Colors.Aqua);
new SearchBar().Icon(SegoeFluentIcons.Mail, 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.
OnPlatform and OnIdiom Usage
Xaml
<mi:MauiIcon Icon="{mi:SegoeFluent People}" OnPlatforms="WinUI, Android, MacCatalyst"/>
<mi:MauiIcon Icon="{mi:SegoeFluent Mail}" OnIdioms="Desktop, Phone, Tablet"/>
<mi:MauiIcon Icon="{mi:SegoeFluent Favicon}" OnPlatforms="Android" OnIdioms="Phone"/>
C#
new MauiIcon().Icon(SegoeFluentIcons.People).OnPlatforms(new List<string>{"WinUI", "Android"});
new MauiIcon().Icon(SegoeFluentIcons.Mail).OnIdioms(new List<string>{"Desktop", "Phone"});
new MauiIcon().Icon(SegoeFluentIcons.Favicon).OnPlatforms(new List<string>{"WinUI", "Android"}).OnIdioms(new List<string>{"Desktop", "Phone"});
Breaking Changes
Version 3 to 4
- Icon won't be applied to the Controls like Entry, SearchBar and etc.. by default Instead v4 would throw an Exception, Need to set FontOverride to true to apply the Icon to these Controls on Builder Extension Level or Control Level
- This Behavior can be reverted to Behavior of v3 by Using new
UseMauiIconsCore
Builder Extension and usingSetDefaultFontOverride
Method like Below
- This Behavior can be reverted to Behavior of v3 by Using new
builder.UseMauiIconsCore(x =>
{
x.SetDefaultFontOverride(true);
})
- Icon Size is Now Set to Control's FontSize by Default, Previously it was set to 30.0 by Default
- This Behavior can be reverted to Behavior of v3 by Using new
UseMauiIconsCore
Builder Extension and usingSetDefaultIconSize
Method like Below
- This Behavior can be reverted to Behavior of v3 by Using new
builder.UseMauiIconsCore(x =>
{
x.SetDefaultIconSize(30.0);
})
Version 2 to 3
- Removal of TypeArgument and Built in OnPlatform and OnIdiom Support, Use MauiIcons Integrated OnPlatform and OnIdioms Feature
- Removal of Dotnet 7 Support
Version 1 to 2
Old (v1)
xmlns:SegoeFluent="clr-namespace:MauiIcons.SegoeFluent;assembly=MauiIcons.SegoeFluent"
<SegoeFluent:MauiIcon Icon="Mail"/>
New (v2)
xmlns:mi="http://www.aathifmahir.com/dotnet/2022/maui/icons"
<mi:MauiIcon Icon="{mi:SegoeFluent Mail}"/>
New Changes in v4
- We have a new way of Assigning/Setting Icons, Introducing New Attached Property for Icons, The new AttachedProperty Brings in Support for Triggers, Behaviors, Styles, etc.. which is lacking on Classic Xaml Markup Extension, and also it's more cleaner and readable
/// Old
<Image Aspect="Center" Source="{mi:SegoeFluent Icon=Share}"/>
// New
<Image Aspect="Center" mi.MauiIcon.Value="{mi:SegoeFluent Icon=Share}"/>
Disclaimer: The Old Xaml Markup Extension is still Supported and can be used, but it's recommended to use the new Attached Property for better support and readability and we have plans to deprecate the old Xaml Markup Extension in the future in favor of Attached Property
Example of Using Styles
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="mi:MauiIcon.Value" Value="{mi:SegoeFluent Icon=Favicon}" />
</Style>
<Button Style="{StaticResource ButtonStyle}"/>
- Introducing New
UseMauiIconsCore
Builder Extension for Setting Default Icon Size, Font Override, Default Font Auto Scaling and etc.. - Improved Built in OnPlatforms and OnIdioms with Binding Improvements and Enhanced Performance
- New
OnClickAnimation
Support for MauiIcon Control
Advanced Usage
The .Net Maui Icons library offers a wide range of features and capabilities, including the ability to customize how icons applied and which property it is applied too and etc. For more information on advanced usage, please refer to the Advanced Usage
License
MauiIcons.SegoeFluent
MauiIcons.SegoeFluent is Licensed Under MIT License.
Segoe Fluent Icons
Segoe FLuent Icons is Licensed by Microsoft Under Couple of License.
Contribute
If you wish to contribute to this project, please don't hesitate to create an issue or request. Your input and feedback are highly appreciated. Additionally, if you're interested in supporting the project by providing resources or becoming a sponsor, your contributions would be welcomed and instrumental in its continued development and success. Thank you for your interest in contributing to this endeavor.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-android34.0 is compatible. net8.0-browser was computed. net8.0-ios was computed. net8.0-ios18.0 is compatible. net8.0-maccatalyst was computed. net8.0-maccatalyst18.0 is compatible. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows10.0.19041 is compatible. |
-
net8.0
- AathifMahir.Maui.MauiIcons.Core (>= 4.0.0)
- Microsoft.Maui.Controls (>= 8.0.82)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.82)
-
net8.0-android34.0
- AathifMahir.Maui.MauiIcons.Core (>= 4.0.0)
- Microsoft.Maui.Controls (>= 8.0.82)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.82)
-
net8.0-ios18.0
- AathifMahir.Maui.MauiIcons.Core (>= 4.0.0)
- Microsoft.Maui.Controls (>= 8.0.82)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.82)
-
net8.0-maccatalyst18.0
- AathifMahir.Maui.MauiIcons.Core (>= 4.0.0)
- Microsoft.Maui.Controls (>= 8.0.82)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.82)
-
net8.0-windows10.0.19041
- AathifMahir.Maui.MauiIcons.Core (>= 4.0.0)
- Microsoft.Maui.Controls (>= 8.0.82)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.82)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on AathifMahir.Maui.MauiIcons.SegoeFluent:
Repository | Stars |
---|---|
beto-rodriguez/Manuela
A productivity framework for Maui
|
Version | Downloads | Last updated | |
---|---|---|---|
4.0.0 | 139 | 10/17/2024 | |
3.0.0 | 2,169 | 5/11/2024 | |
2.2.5 | 155 | 5/6/2024 | |
2.2.0-pre | 127 | 5/4/2024 | |
2.1.5 | 1,559 | 4/1/2024 | |
2.1.2 | 264 | 3/17/2024 | |
2.1.1 | 193 | 2/1/2024 | |
2.1.0 | 288 | 12/23/2023 | |
2.0.0 | 215 | 11/17/2023 | |
2.0.0-rc1.1 | 75 | 11/14/2023 | |
1.2.1 | 2,029 | 8/15/2023 | |
1.2.0 | 204 | 7/1/2023 | |
1.1.5 | 187 | 6/17/2023 | |
1.1.1 | 186 | 6/3/2023 | |
1.1.0 | 295 | 3/10/2023 | |
1.1.0-pre1 | 160 | 3/3/2023 | |
1.0.1 | 320 | 12/7/2022 | |
1.0.0 | 343 | 11/19/2022 | |
0.2.0-pre2 | 143 | 11/8/2022 | |
0.2.0-pre1 | 173 | 11/7/2022 |
v4.0.0
• Various Enhancements and Fixes for MauiIcon Control
• New Attached Property for Seamless Icon Integration
• Styles and Triggers Support
• New OnClick Animation Support for MauiIcon Control
• Enhanced Global Customization Support using New `UseMauiIconsCore` Extension
• Overall Fixes and Enhancements
• Breaking Changes: [https://github.com/AathifMahir/MauiIcons/#breaking-changes]
v3.0.0
• Critical Fixes for Xaml Markup Binding Support
• Breaking Changes: Removal of Dotnet 7 Support
• Breaking Changes: Removal of Maui OnPlatform and OnIdioms Support Instead Use MauiIcons Integrated Custom OnPlatforms and OnIdioms Feature
v2.2.5
• New and Improved Xaml Markup Extension with Binding Support
v2.1.5
• New and Improved Extension for MauiIcon C#
v2.1.2
• Minor Fixes and Improvements for Base Extension
v2.1.1
• Minor Patch on Issue #83
v2.1.0
• Docs Update
v2.0.0
• New Modular Core
• Major Core Control Enhancements
• Icon Suffix Support on Core Control
• Major Core Extension Enhanecements and Support for C# Markup Extension
• New C# Markup Extension for Maui Built in Controls
• New OnPlatform and OnIdioms Support
• Improved Docs
• Breaking Changes - https://github.com/AathifMahir/MauiIcons/#breaking-changes-from-v2
v1.2.1
• Added Support for Vanilla Version of Dotnet to Unit Test the Project
v1.2.0
• Added Variant Support Base Control and Extension
• New and Improved Icon Control
v1.1.5
• Added Icon Unicode Support for Icon Extension
• Added Direct Content Support
• Minor Enhancements and Fixes
v1.1.1
• Minor Enhancements and Fixes
v1.1.0
• Dotnet 7 Support
• Minor Enhancements and Fixes
v1.0.1
• Fixed Missing Cast
v1.0.0
• First Milestone Build and Production App Ready
v0.2.0-pre2
• Ported Critical Fix from Stable Build
v0.2.0-pre1
• New Default Windows Fluent Icon Package with New Namespace
• Enhancements and Fixes
v0.1.0
• First Stable Build
• Added New Attributes to Icon Extension
• Improvements to Documentation