Introducing the New .NET MAUI Numeric Entry Control
Tags: dotnetmaui, mobile, whatsnew, desktop
Published: 2023-07-07 12:51:47

---
title: Introducing the New .NET MAUI Numeric Entry Control
published: true
date: 2023-07-07 11:45:08 UTC
tags: dotnetmaui, mobile, whatsnew, desktop
canonical_url: https://www.syncfusion.com/blogs/post/dotnet-maui-numeric-entry.aspx
cover_image: 
---
In Syncfusion’s Essential Studio [2023 Volume 2](https://www.syncfusion.com/forums/183035/essential-studio-2023-volume-2-main-release-v22-1-34-is-available-for-download "Essential Studio 2023 Volume 2") release, we introduced a new [Numeric Entry control for the .NET MAUI](https://www.syncfusion.com/maui-controls/maui-numeric-entry ".NET MAUI Numeric Entry") platform.

The Numeric Entry control provides a user-friendly and advanced input experience for numeric values. It supports a wide range of numeric formats, including currency, percentages, and decimals. Numeric Entry provides an enhanced user experience and facilitates input validation.

In this article, we will see the key features of the new .NET MAUI Numeric Entry control and the steps to get started with it.

## Key features

The .NET MAUI Numeric Entry supports many user-friendly features. The highlights are:

- [Input validation](#Input)
- [Custom formatting](#Custom)
- [Value restriction](#Value)
- [Placeholders](#Placeholders)
- [Localization](#Localization)

###<a name="Input">Input validation</a>

The Numeric Entry control performs input validation when an input field loses focus or the Enter key is pressed. This ensures that the entered value is in the expected numerical format and falls within the acceptable range or any other defined conditions.
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/07/Input-Validation-in-.NET-MAUI-Numeric-Entry-Control.gif" alt="Input Validation in .NET MAUI Numeric Entry Control" style="width:100%">

  <figcaption>Input Validation in .NET MAUI Numeric Entry Control</figcaption>

</figure>

###<a name="Custom">Custom formatting</a>

You can customize the format of the numeric values. You can choose the number of decimal digits and even add prefixes and suffixes, thus supporting a highly customized data entry process.
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/07/Custom-Formatting-in-.NET-MAUI-Numeric-Entry-Control.png" alt="Custom Formatting in .NET MAUI Numeric Entry Control" style="width:100%">

  <figcaption>Custom Formatting in .NET MAUI Numeric Entry Control</figcaption>

</figure>

###<a name="Value">Value restriction</a>

The Numeric Entry control allows you to impose various restrictions on the input values:

- **Limit the number range:** Easily restrict users from entering input values outside a range set with minimum and maximum values.
- **Disable editing:** Restrict a user’s ability to edit values in the control.
- **Prevent empty editor** : Prevent users from entering empty or null input values.

Refer to the following images.
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/07/Limiting-the-Number-Range-in-.NET-MAUI-Numeric-Entry-Control.gif" alt="Limiting the Number Range in .NET MAUI Numeric Entry Control" style="width:100%">

  <figcaption>Limiting the Number Range in .NET MAUI Numeric Entry Control</figcaption>

</figure>
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/07/Disabling-Editing-in-.NET-MAUI-Numeric-Entry-Control.gif" alt="Disabling Editing in .NET MAUI Numeric Entry Control" style="width:100%">

  <figcaption>Disabling Editing in .NET MAUI Numeric Entry Control</figcaption>

</figure>
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/07/Preventing-Null-Input-Values-in-.NET-MAUI-Numeric-Entry-Control.gif" alt="Preventing Null Input Values in .NET MAUI Numeric Entry Control" style="width:100%">

  <figcaption>Preventing Null Input Values in .NET MAUI Numeric Entry Control</figcaption>

</figure>

###<a name="Placeholders">Placeholders</a>

The placeholder feature allows you to provide hints for data entry fields in the Numeric Entry control. This guides the user with the required format of the input values and keeps them from entering a null value.
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/07/Placeholder-Support-in-.NET-MAUI-Numeric-Entry-Control.png" alt="Placeholder Support in .NET MAUI Numeric Entry Control" style="width:100%">

  <figcaption>Placeholder Support in .NET MAUI Numeric Entry Control</figcaption>

</figure>

###<a name="Localization">Localization</a>

The Numeric Entry control automatically formats the input values based on the regional or cultural settings, ensuring that your app is localized and supports different cultural preferences.
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/07/Localization-in-.NET-MAUI-Numeric-Entry-Control.png" alt="Localization in .NET MAUI Numeric Entry Control" style="width:100%">

  <figcaption>Localization in .NET MAUI Numeric Entry Control</figcaption>

</figure>

**Note:** Refer to the [.NET MAUI Numeric Entry control documentation](https://help.syncfusion.com/maui/numericentry/overview "Getting started with .NET MAUI Numeric Entry control") to explore the other features.

## Getting started with the .NET MAUI Numeric Entry control

We have seen the key features of the .NET MAUI Numeric Entry control. Let’s learn how to integrate it into your .NET MAUI app and utilize its features:

**Step 1:**  First, create [a .NET MAUI app](https://learn.microsoft.com/en-us/dotnet/maui/get-started/first-app?view=net-maui-7.0&tabs=vswin&pivots=devices-android "Build your first .NET MAUI app").

**Step 2:**  The Syncfusion .NET MAUI controls are available on [NuGet Gallery](https://www.nuget.org/ "NuGet Gallery"). To add the .NET MAUI Numeric Entry control to your project, open the  **NuGet package manager**  in [Visual Studio](https://visualstudio.microsoft.com/ "Visual Studio"). Search for [Syncfusion.Maui.Inputs](https://www.nuget.org/packages/Syncfusion.Maui.Inputs "Syncfusion.Maui.Inputs NuGet Package"), and then install it.

**Step 3:**  Now, register the handler for the Syncfusion core in the  **MauiProgram.cs**  file.

```csharp
Using Microsoft.Maui;
using Microsoft.Maui.Hosting;
using Microsoft.Maui.Controls.Compatibility;
using Microsoft.Maui.Controls.Hosting;
using Microsoft.Maui.Controls.Xaml;
using Syncfusion.Maui.Core.Hosting;
namespace NumericEntrySample
{
  public static class MauiProgram
  {
     public static MauiApp CreateMauiApp()
     {
	var builder = MauiApp.CreateBuilder();
	builder
	  .UseMauiApp<App>()
	  .ConfigureSyncfusionCore()
	  .ConfigureFonts(fonts =>
	   {
	      fonts.AddFont(“OpenSans-Regular.ttf”, “OpenSansRegular”);
	   });
           return builder.Build();
     }
  }
}
```

**Step 4:** Add the **Syncfusion.Maui.Inputs** namespace in your XAML page.

```csharp
Xmlns:inputs=”clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs”
```

**Step 5:** Finally, initialize the Syncfusion .NET MAUI Numeric Entry control. Refer to the following code example.

```xml
<inputs:SfNumericEntry x:Name=”numericEntry”
                      WidthRequest=”300”
                      CustomFormat=”C2”
                      Value=”100” />
```

Refer to the following output image.
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/07/Integrating-the-Numeric-Entry-Control-in-a-.NET-MAUI-Application.png" alt="Integrating the Numeric Entry Control in a .NET MAUI Application" style="width:100%">

  <figcaption>Integrating the Numeric Entry Control in a .NET MAUI Application</figcaption>

</figure>

## GitHub reference

Check out the [.NET MAUI Numeric Entry control GitHub demo](https://github.com/SyncfusionExamples/maui-numericentry-samples ".NET MAUI Numeric Entry control GitHub demo").

## Conclusion

Thanks for reading! Overall, the new Syncfusion [.NET MAUI Numeric Entry control](https://www.syncfusion.com/maui-controls/maui-numeric-entry ".NET MAUI Numeric Entry") is a great fit for developers building cross-platform mobile apps. This control is available in our [2023 Volume 2 ](https://www.syncfusion.com/forums/183035/essential-studio-2023-volume-2-main-release-v22-1-34-is-available-for-download "Essential Studio 2023 Volume 2")release. Check out our [Release Notes](https://www.syncfusion.com/products/release-history "Essential Studio Release Notes") and [What’s New](https://www.syncfusion.com/products/whatsnew "Essential Studio What’s New page") pages to see the other updates in this release, and leave your feedback in the comments section below!

Download [Essential Studio for .NET MAUI](https://www.syncfusion.com/downloads/maui "Essential Studio for .NET MAUI") to start evaluating its controls immediately.

If you have questions, please contact us through our [support forum](https://www.syncfusion.com/forums "Syncfusion Support Forum"), [support portal](https://support.syncfusion.com/support/tickets "Syncfusion Support Portal"), or [feedback portal](https://www.syncfusion.com/feedback/ "Syncfusion Feedback Portal"). We are always happy to help you!

## Related blogs

- [Introducing the New .NET MAUI Image Editor Control](https://www.syncfusion.com/blogs/post/dotnet-maui-image-editor-control.aspx "Blog: Introducing the New .NET MAUI Image Editor Control")
- [Introducing the .NET MAUI Toolbox for Visual Studio](https://www.syncfusion.com/blogs/post/dotnet-maui-visual-studio-toolbox.aspx "Blog: Introducing the .NET MAUI Toolbox for Visual Studio")
- [Introducing the 8th Set of .NET MAUI Controls and Features](https://www.syncfusion.com/blogs/post/whats-new-dotnet-maui.aspx "Blog: Introducing the 8th Set of .NET MAUI Controls and Features")
- [Chart of the Week: Creating a .NET MAUI Multiple-Column Chart to Visualize the Purchase Revenue of US E-Health and Meditation Apps](https://www.syncfusion.com/blogs/post/dotnet-maui-multiple-column-chart-visualize-health-app-revenue.aspx "Blog: Chart of the Week: Creating a .NET MAUI Multiple-Column Chart to Visualize the Purchase Revenue of US E-Health and Meditation Apps")