-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d84942
commit d5127b0
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<App>() | ||
.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 | ||
<!-- Replace --> | ||
{StaticResource MaterialDesign_{IconName}} | ||
<!-- with --> | ||
{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}} |