# .NET MAUI MaskedEntry Value

All MaskedEntry types expose a `Value` property that gets or sets the current input without the formatting characters.

| Masked Type             | `Value` Type |
| ----------------------- | ------------ |
| `RadTextMaskedEntry`    | `string`     |
| `RadEmailMaskedEntry`   | `string`     |
| `RadRegexMaskedEntry`   | `string`     |
| `RadIPMaskedEntry`      | `string`     |
| `RadNumericMaskedEntry` | `object`     |

The value of the `Value` property accepts null, if the `AllowNullValue` property is set to `true`.

> caption Example with `RadTextMaskedEntry`

Define the `RadTextMaskedEntry` in XAML:

```XAML
<telerik:RadTextMaskedEntry x:Name="textMaskedEntry" Mask="aaaa" Value="ABCD" AutomationId="textMask"/>
```

Add the `telerik` namespace:

```XAML
xmlns:telerik="clr-namespace:Telerik.Maui.Controls;assembly=Telerik.Maui.Controls"
```

Define the `RadTextMaskedEntry` in C#:

```C#
var mask = new RadTextMaskedEntry
{
    Value = "Test"
};
```

Add the `telerik` namespace:

```C#
using Telerik.Maui.Controls;
```

## Null Value Support

By default, the MaskedEntry control doesn't allow you to set `null` to its `Value` property. Instead, the `null` value in the NumericMaskedEntry is coerced to `0`. To allow `null` values, set the `AllowNullValue` property to `true`.

> caption `RadNumericMaskedEntry` with null value support

Define the control:

```XAML
<telerik:RadNumericMaskedEntry x:Name="allowNullValuesTextMaskedEntry" Value="5"  AllowNullValue="True" AutomationId="textMaskNullAllowed"/>
```

Add the namespace:

```XAML
xmlns:telerik="clr-namespace:Telerik.Maui.Controls;assembly=Telerik.Maui.Controls"
```

> For the MaskedEntry Value example, go to the [SDKBrowser Demo Application](https://www.telerik.com/maui-ui/documentation/demos-and-sample-apps/sdkbrowser-app) and navigate to **MaskedEntry > Features** category.

## See Also

* [Mask Types](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/mask-types/overview)
* [Validation](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/validation)
* [Events](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/events)
* [Globalization](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/globalization)
