An open API service indexing awesome lists of open source software.

https://github.com/vapolia/StrokedLabel

Maui Labels with a border !
https://github.com/vapolia/StrokedLabel

Last synced: about 1 month ago
JSON representation

Maui Labels with a border !

Awesome Lists containing this project

README

        

# Stroked Labels

[![NuGet][nuget-img]][nuget-link]
![Nuget](https://img.shields.io/nuget/dt/Vapolia.StrokedLabel)
[![Publish To Nuget](https://github.com/vapolia/StrokedLabel/actions/workflows/main.yaml/badge.svg)](https://github.com/vapolia/StrokedLabel/actions/workflows/main.yaml)

![image](https://github.com/user-attachments/assets/7551e1f0-01b0-49b7-8824-64b14957aad7)

[nuget-link]: https://www.nuget.org/packages/Vapolia.StrokedLabel/
[nuget-img]: https://img.shields.io/nuget/v/Vapolia.StrokedLabel

Platforms:
- Android
- iOS

# Quick start

Add the above nuget package to your Maui project
```cs
dotnet add package Vapolia.StrokedLabel
```

then add this line to your maui app builder:

```c#
using Vapolia.StrokedLabels;
...
builder.UseStrokedLabelBehavior();
```

# Usage

Declare the namespace:
```xaml

```

Apply the behavior to a label:
```xaml

```

Or apply the behavior through a style:
```xaml



<Setter Property="TextColor" Value="LightBlue" />
<Setter Property="stroked:StrokedLabel.StrokeColor" Value="DarkBlue" />
<Setter Property="stroked:StrokedLabel.StrokeWidth" Value="4" />

```

# Examples

See the SampleApp in this repo.

# Limitations

This behavior is working only with the Label's `Text` property. It does not work with the `FormattedText` property (nor `Span`s).
An implementation could be made in the future by using [that code](https://github.com/santaevpavel/OutlineSpan/blob/master/OutlineSpanLib/src/main/kotlin/ru/santaev/outlinespan/OutlineSpan.kt) on android.