From d5127b0c92b7f959376630451e4e0a9f693bafcc Mon Sep 17 00:00:00 2001 From: Andreas Date: Sun, 29 Jan 2023 08:30:27 +0100 Subject: [PATCH] Finialized 1.0.9 --- .../SharedMauiXamlStylesLibrary.csproj | 1 + src/SharedMauiXamlStylesLibrary/readme.txt | 54 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 src/SharedMauiXamlStylesLibrary/readme.txt diff --git a/src/SharedMauiXamlStylesLibrary/SharedMauiXamlStylesLibrary.csproj b/src/SharedMauiXamlStylesLibrary/SharedMauiXamlStylesLibrary.csproj index bb011472..a5dc3672 100644 --- a/src/SharedMauiXamlStylesLibrary/SharedMauiXamlStylesLibrary.csproj +++ b/src/SharedMauiXamlStylesLibrary/SharedMauiXamlStylesLibrary.csproj @@ -31,6 +31,7 @@ + diff --git a/src/SharedMauiXamlStylesLibrary/readme.txt b/src/SharedMauiXamlStylesLibrary/readme.txt new file mode 100644 index 00000000..f95538e9 --- /dev/null +++ b/src/SharedMauiXamlStylesLibrary/readme.txt @@ -0,0 +1,54 @@ +# Getting started +Open the `MauiProgramm.cs` file and add `InitializeSharedMauiStyles()` + +```csharp +public static MauiApp CreateMauiApp() +{ + MauiAppBuilder builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .UseMauiCommunityToolkit() + .ConfigureFonts(fonts => + { + // Your custom used fonts + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); + }) + // Initializes the library + .InitializeSharedMauiStyles(); // <== Add this line +} + +For further instructions or issues, please visit the project page on github. +https://github.com/AndreasReitberger/SharedMauiXamlStyles + +# Important update notice +Since 1.0.9, we changed the location for the `FontIconKeys`. +In order to use the library, you need to migrate to use the new `FontIconKeys` instead. + +Please follow the guide below. + +# Migration Guide + +https://github.com/AndreasReitberger/SharedMauiXamlStyles/wiki/Use-Icons-in-XAML-content#reference-icons + +# Icons reference + +In each XAML content, where you want to use the icons, please reference following namespace. + +```xaml +xmlns:icons="clr-namespace:AndreasReitberger.Shared.FontIcons;assembly=SharedMauiXamlStylesLibrary" +```xaml + +If you already have used our style library, please replace all StaticResource as followd. + +```xaml + +{StaticResource MaterialDesign_{IconName}} + +{x:Static icons:MaterialIcons.{IconName}} +``` + +# Available fonts + +* MaterialDesign: {x:Static icons:MaterialIcons.{IconName}} +* FluentIcon: {x:Static icons:FluentIcons.{IconName}} +* Syncfusion: {x:Static icons:SyncfusionIcons.{IconName}} \ No newline at end of file