Mtf.Maui.Controls 1.0.19

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

// Install Mtf.Maui.Controls as a Cake Tool
#tool nuget:?package=Mtf.Maui.Controls&version=1.0.19                

Mtf.Maui.Controls Documentation

Overview

The Mtf.Maui.Controls library provides a set of reusable, customizable ContentView components for .NET MAUI applications. These components enhance user interface capabilities with features like labeled controls, hyperlinks, and numeric input.


Components

1. CheckBoxWithLabel

A ContentView combining a CheckBox with a customizable label.

Properties
  • Label (string): The text displayed alongside the checkbox.
  • IsChecked (bool): The checked state of the checkbox. Supports two-way binding.
Commands
  • ToggleCommand: Toggles the IsChecked state programmatically.
Example Usage
<controls:CheckBoxWithLabel 
    Label="Accept Terms and Conditions" 
    IsChecked="{Binding IsAccepted}" />

2. EntryWithLabel

A labeled Entry field with extensive customization options.

Properties
  • Label (string): The label displayed above or alongside the entry.
  • Placeholder (string): Placeholder text for the entry. Defaults to Label if not set.
  • Text (string): The entry�s text. Supports two-way binding.
  • Keyboard (Keyboard): The type of keyboard (e.g., Keyboard.Numeric).
  • IsPassword (bool): Indicates if the entry should mask text (e.g., for passwords).
  • IsReadOnly (bool): Disables text input when true.
  • EntryTextColor (Color): Color of the entry text.
  • EntryMinimumWidthRequest (int): Minimum width of the entry.
  • EntryMinimumHeightRequest (int): Minimum height of the entry.
Events
  • TextChanged: Triggered when the Text value changes.
Commands
  • CopyToClipboardCommand: Copies the entry�s text to the clipboard.
Example Usage
<controls:EntryWithLabel 
    Label="Username" 
    Placeholder="Enter your username" 
    Text="{Binding Username}" 
    IsPassword="False" />

A clickable hyperlink styled with visual feedback.

Properties
  • Url (string): The URL to navigate to.
  • LinkLabel (string): The text displayed for the hyperlink.
Behavior
  • Changes color on hover.
  • Opens the URL in the system�s default browser.
Example Usage
<controls:Hyperlink 
    Url="https://example.com" 
    LinkLabel="Visit Example" />

A customizable menu item with navigation support.

Properties
  • ImageSource (List<string>): Image sources for the menu icon.
  • LabelText (string): Text displayed on the menu item.
  • PageType (Type): The page to navigate to when clicked.
  • Parameter (object): Parameter to pass during navigation.
  • AfterExecution (ICommand): Command to execute after navigation.
Commands
  • NavigateCommand: Navigates to the specified page.
Example Usage
<controls:MenuItemView 
    LabelText="Settings" 
    PageType="{x:Type pages:SettingsPage}" />

You can set up the MenuItemView to download images from an online source.

ImageSettings.UseOfflineImages = false;
ImageSettings.ImagesUrl = "https://cdn.example.com/images/";
ImageSettings.NumberOfDaysToCacheImages = 30; // Cache for 30 days

5. NumericUpDownWithLabel

A numeric input control with increment and decrement buttons.

Properties
  • Label (string): Label displayed next to the control.
  • Value (double): Current value. Supports two-way binding.
  • Minimum (double): Minimum allowed value.
  • Maximum (double): Maximum allowed value.
  • Increment (double): Step size for value changes.
Events
  • ValueChanged: Triggered when Value changes.
Behavior
  • Pressing and holding increment or decrement buttons changes the value repeatedly.
Example Usage
<controls:NumericUpDownWithLabel 
    Label="Quantity" 
    Value="{Binding Quantity}" 
    Minimum="1" 
    Maximum="100" 
    Increment="1" />

Dependencies

  • CommunityToolkit.Mvvm: Used for commands and messaging.
  • System.Maui: Base dependency for MAUI applications.

Installation

Add the Mtf.Maui.Controls library to your MAUI project via NuGet:

dotnet add package Mtf.Maui.Controls

License

This library is provided under the MIT License. Feel free to use and modify it in your applications.

Product Compatible and additional computed target framework versions.
.NET net8.0-android34.0 is compatible.  net8.0-ios18.0 is compatible.  net8.0-maccatalyst18.0 is compatible.  net8.0-windows10.0.19041 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.19 84 12/10/2024
1.0.18 85 12/10/2024
1.0.17 84 12/10/2024
1.0.16 87 12/9/2024
1.0.14 99 11/19/2024
1.0.12 79 11/19/2024
1.0.11 86 11/19/2024