Monkey Mask is a simple masking API designed for Xamarin.Forms, UWP, WPF and any platform that supports NetStandard.
Monkey Mask was designed for masking strings as they are entered in an Entry field.
Suppose you have an Entry Field where you would like to support formatting a phone number (123-456-7890). The library is intended to call it's MonkeyEntry.Mask()
method with each keystroke so the value appears formatted as they continue to type.
Final Input | Format |
---|---|
123-456-7890 |
###-###-#### |
- Input:
1
- Input:
12
- Input:
123-
- Input:
123-4
- Input:
123-45
- Input:
123-456-
- Input:
123-456-7
- Input:
123-456-78
- Input:
123-456-789
- Input:
123-456-7890
Currently MonkeyMask only supports masking digits, we will support alpha numerics in the next release
- CI NuGet Feed: https://ci.appveyor.com/nuget/monkeymask
TabStrip is available for use in Xamarin.Forms only targetting the following supported platforms.
Platform | Supported | Version |
---|---|---|
Xamarin.Android | Yes | NetStandard1.0 |
Xamarin.iOS | Yes | NetStandard1.0 |
Xamarin 10 UWP | Yes | NetStandard1.0 |
WPF | Yes | NetStandard1.0 |
UWP | Yes | NetStandard1.0 |
// partial mask
var input = "123-4";
var format = "###-####";
MonkeyEntry.Mask(input, format);
// full mask
var input = "123-4567";
var format = "###-####";
MonkeyEntry.Mask(input, format);
// full mask and limit a max length
var input = "123-4567";
var format = "###-####";
MonkeyEntry.Mask(input, format, 7);
// partial mask
var input = "123-4";
var format = "###-####";
input.Mask(input, format);
// full mask
var input = "123-4567";
var format = "###-####";
input.Mask(input, format);
// full mask and limit a max length
var input = "123-4567";
var format = "###-####";
input.Mask(input, format, 7);
Created By: @Andrew_Hoefling
- Twitter: @Andrew_Hoefling
- Blog: andrewhoefling.com
The MIT License (MIT) see License File