Vapolia.StrokedLabel 1.0.3

Prefix Reserved
dotnet add package Vapolia.StrokedLabel --version 1.0.3
                    
NuGet\Install-Package Vapolia.StrokedLabel -Version 1.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Vapolia.StrokedLabel" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Vapolia.StrokedLabel" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Vapolia.StrokedLabel" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Vapolia.StrokedLabel --version 1.0.3
                    
#r "nuget: Vapolia.StrokedLabel, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Vapolia.StrokedLabel@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Vapolia.StrokedLabel&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Vapolia.StrokedLabel&version=1.0.3
                    
Install as a Cake Tool

Stroked Labels

NuGet
Nuget
Publish To Nuget

image

Platforms:

  • Android
  • iOS, MacOS
  • Windows is a work in progress. The properties will be ignored for now.

Quick start

Add the above nuget package to your Maui project

dotnet add package Vapolia.StrokedLabel

then add this line to your maui app builder:

using Vapolia.StrokedLabels;
...
builder.UseStrokedLabelBehavior();

Usage

Declare the namespace:

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
         ...
         xmlns:stroked="https://vapolia.eu/Vapolia.StrokedLabel">

Apply the behavior to a label:

<Label Text="I do really like it!"
       FontSize="32"
       TextColor="LightBlue"
       stroked:StrokedLabel.StrokeColor="DarkBlue"
       stroked:StrokedLabel.StrokeWidth="4"  />

Or apply the behavior through a style:

<StackLayout>
    <StackLayout.Resources>
        <Style TargetType="Label">
            <Setter Property="TextColor" Value="LightBlue" />
            <Setter Property="stroked:StrokedLabel.StrokeColor" Value="DarkBlue" />
            <Setter Property="stroked:StrokedLabel.StrokeWidth" Value="4" />
        </Style>
    </StackLayout.Resources>

    <Label FontSize="32" Text="I like it so much!" />
</StackLayout>

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 Spans). An implementation could be made in the future by using that code on android.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-android35.0 is compatible.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-ios18.0 is compatible.  net9.0-maccatalyst was computed.  net9.0-maccatalyst18.0 is compatible.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net9.0-windows10.0.19041 is compatible.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 107 8/1/2025
1.0.2 1,243 1/16/2025
1.0.1 394 9/24/2024
1.0.0 144 9/24/2024

1.0.3: add support for windows and macOs
           1.0.2: net9 in addition to net8
           1.0.1: Fix android
           1.0.0: Initial release