MPad.Lib 1.0.0

dotnet add package MPad.Lib --version 1.0.0                
NuGet\Install-Package MPad.Lib -Version 1.0.0                
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="MPad.Lib" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MPad.Lib --version 1.0.0                
#r "nuget: MPad.Lib, 1.0.0"                
#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.
// Install MPad.Lib as a Cake Addin
#addin nuget:?package=MPad.Lib&version=1.0.0

// Install MPad.Lib as a Cake Tool
#tool nuget:?package=MPad.Lib&version=1.0.0                

MPad - a simple .NET MAUI joypad control

MPad is a single joystick button that can be used in .NET MAUI Android and iOS apps. It provides 3 axis measurements, a event handler and command to consume new values.

Usage

First add the package via nuget

dotnet add package MPad.Lib

Then, in MauiProgram add the UseMauiCompatibility method on CreateMauiApp method:

    var builder = MauiApp.CreateBuilder();
    builder
        .UseMauiApp<App>()
        .ConfigureFonts(fonts =>
        {
            fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
            fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
        })
        .UseMauiCompatibility();

After that, create the control on .xaml page and add the following lines on Content page node:

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:m="clr-namespace:MPad.Lib;assembly=MPad.Lib"
             x:Class="MyApp.MainPage"
             xmlns:compat="clr-namespace:Microsoft.Maui.Controls.Compatibility;assembly=Microsoft.Maui.Controls">

That's it. The control supports MVVM pattern, using the XAxis, YAxis, ZAxis properties and command binded to a view model

Product Compatible and additional computed target framework versions.
.NET net8.0-android34.0 is compatible.  net8.0-ios17.5 is compatible. 
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.0 112 8/9/2024