Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jon2g/maui-justifylabel
https://github.com/jon2g/maui-justifylabel
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jon2g/maui-justifylabel
- Owner: Jon2G
- License: mit
- Created: 2024-08-13T23:45:30.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-04T17:48:02.000Z (4 months ago)
- Last Synced: 2024-11-07T12:49:07.894Z (2 months ago)
- Language: C#
- Size: 1.39 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MAUI-JustifyLabel
Justify label for MAUIProvides the ability to justify the text in a Label via attached property or by using a custom control.
[![NuGet version (MAUI-JustifyLabel)](https://img.shields.io/nuget/v/JustifyLabel-MAUI.svg)](https://www.nuget.org/packages/JustifyLabel-MAUI/)
### Windows
![Sample](https://raw.githubusercontent.com/Jon2G/MAUI-JustifyLabel/main/screenshots/windows.PNG)### Android
![Sample](https://raw.githubusercontent.com/Jon2G/MAUI-JustifyLabel/main/screenshots/android_1.PNG)
![Sample](https://raw.githubusercontent.com/Jon2G/MAUI-JustifyLabel/main/screenshots/android_2.PNG)### iOS
![Sample](https://raw.githubusercontent.com/Jon2G/MAUI-JustifyLabel/main/screenshots/ios.jpeg)### MacCatalysis
![Sample](https://raw.githubusercontent.com/Jon2G/MAUI-JustifyLabel/main/screenshots/mac.png)### Usage:
### Attached property
```
xmlns:justifiedLabel="clr-namespace:JustifyLabel;assembly=JustifyLabel"
``````
```### Custom control
On MauiProgram.cs
```
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp()
.UseJustifiedLabel() //Add this line
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
``````
xmlns:justifiedLabel="clr-namespace:JustifyLabel;assembly=JustifyLabel"
``````
```