OyeMaterialDesignTextInput 2.0.1

dotnet add package OyeMaterialDesignTextInput --version 2.0.1
                    
NuGet\Install-Package OyeMaterialDesignTextInput -Version 2.0.1
                    
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="OyeMaterialDesignTextInput" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OyeMaterialDesignTextInput" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="OyeMaterialDesignTextInput" />
                    
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 OyeMaterialDesignTextInput --version 2.0.1
                    
#r "nuget: OyeMaterialDesignTextInput, 2.0.1"
                    
#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 OyeMaterialDesignTextInput@2.0.1
                    
#: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=OyeMaterialDesignTextInput&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=OyeMaterialDesignTextInput&version=2.0.1
                    
Install as a Cake Tool

Custom Material Design for .NET MAUI

A library that brings Material Design floating labels and custom inputs to .NET MAUI applications.

Features

  • Floating label Material Design text inputs.
  • Customizable placeholder, border color, and input styling.
  • Password masking functionality.

Installation

You can install this library via NuGet by running the following command:

dotnet add package OyeMaterialDesignTextInput

Configuration

To configure this library in your MAUI application, follow the steps below.

Step 1: Modify the MauiProgram class

In the MauiProgram class, you need to import the OyeMaterialDesignTextInput middleware.

public static class MauiProgram
{
    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();
        builder
            .UseMauiApp<App>()
            .ConfigureFonts(fonts =>
            {
                fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
                fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
            });
        //--- Import the OyeMaterialDesignTextInput middleware ---
        builder.UseOyeMaterialDesignTextInput();

        return builder.Build();
    }
}

Step 2: Add Custom Controls to Your Page

In your XAML page, import the OyeMaterialDesignTextInput namespace and use the custom controls provided by the library.

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="TestCode.MainPage"
             xmlns:customControls="clr-namespace:OyeMaterialDesignTextInput.CustomControls;assembly=OyeMaterialDesignTextInput">

    <ScrollView>
        <VerticalStackLayout
            Padding="30,0"
            Spacing="25">

            <customControls:BorderedEntry Placeholder="First Name" />
            <customControls:BorderedEntry Placeholder="Last Name" BorderColor="Green"/>
            <customControls:BorderedEntry Placeholder="Password" IsPassword="true" BorderColor="DarkRed"/>

        </VerticalStackLayout>
    </ScrollView>

</ContentPage>

Usage

  • BorderedEntry: A custom Material Design entry with a floating label and a customizable border.
  • Properties:
    • Placeholder: Sets the placeholder text.
    • BorderColor: Sets the border color of the entry.
    • IsPassword: Boolean to indicate if the entry is a password field.
    • Keyboard: Sets the Keyboard input type: Numeric, Plain, Email, Telephone...

With this, you have a simple, yet powerful way to integrate Floating Label Material Design-style text inputs into your .NET MAUI application!

Your support is highly welcomed: https://buymeacoffee.com/devoye

Product Compatible and additional computed target framework versions.
.NET net8.0-android34.0 is compatible.  net8.0-ios17.5 is compatible.  net8.0-maccatalyst17.5 is compatible.  net8.0-windows10.0.19041 is compatible.  net9.0-android was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-windows was computed.  net10.0-android was computed.  net10.0-ios was computed.  net10.0-maccatalyst 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
2.0.1 124 9/23/2024
2.0.0 112 9/23/2024
1.0.0 178 9/16/2024 1.0.0 is deprecated because it is no longer maintained and has critical bugs.