Class
RadMaskedEntryBase

Represents the base class for masked entry controls that provide input validation and formatting through mask patterns. This abstract class implements the core functionality for masked input controls with support for culture-specific formatting, custom prompt characters, and validation.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public abstract class RadMaskedEntryBase : Layout, IRadMaskedEntry, IView, IElement, ITransform

Inheritance: objectRadMaskedEntryBase

Derived Classes: RadIPMaskedEntryRadNumericMaskedEntryRadRegexMaskedEntryRadTextMaskedEntry

Implements: IElementIRadMaskedEntryITransformIView

Constructors

RadMaskedEntryBase()

Initializes a new instance of the RadMaskedEntryBase class.

Declaration

cs-api-definition
public RadMaskedEntryBase()

Fields

ActualValidationErrorMessageProperty

Identifies the ActualValidationErrorMessage bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty ActualValidationErrorMessageProperty

Field Value

BindableProperty

AllowNullValueProperty

Identifies the AllowNullValue bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty AllowNullValueProperty

Field Value

BindableProperty

AllowPromptAsInputProperty

Identifies the AllowPromptAsInput bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty AllowPromptAsInputProperty

Field Value

BindableProperty

ClearButtonStyleProperty

Identifies the ClearButtonStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty ClearButtonStyleProperty

Field Value

BindableProperty

ClearButtonVisibilityProperty

Identifies the ClearButtonVisibility bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty ClearButtonVisibilityProperty

Field Value

BindableProperty

ControlTemplateProperty

Identifies the ControlTemplate bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty ControlTemplateProperty

Field Value

BindableProperty

CultureProperty

Identifies the Culture bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty CultureProperty

Field Value

BindableProperty

EntryBackgroundColorProperty

Identifies the EntryBackgroundColor bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty EntryBackgroundColorProperty

Field Value

BindableProperty

EntryCornerRadiusProperty

Identifies the EntryCornerRadius bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty EntryCornerRadiusProperty

Field Value

BindableProperty

FontFamilyProperty

Identifies the FontFamily bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty FontFamilyProperty

Field Value

BindableProperty

FontSizeProperty

Identifies the FontSize bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty FontSizeProperty

Field Value

BindableProperty

IsReadOnlyProperty

Identifies the IsReadOnly bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty IsReadOnlyProperty

Field Value

BindableProperty

IsValueValidProperty

Identifies the IsValueValid bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty IsValueValidProperty

Field Value

BindableProperty

KeyboardProperty

Identifies the Keyboard bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty KeyboardProperty

Field Value

BindableProperty

MaskProperty

Identifies the Mask bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty MaskProperty

Field Value

BindableProperty

PlaceholderProperty

Identifies the Placeholder bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty PlaceholderProperty

Field Value

BindableProperty

PromptCharProperty

Identifies the PromptChar bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty PromptCharProperty

Field Value

BindableProperty

TextColorProperty

Identifies the TextColor bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty TextColorProperty

Field Value

BindableProperty

TextProperty

Identifies the Text bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty TextProperty

Field Value

BindableProperty

ValidationErrorMessageProperty

Identifies the ValidationErrorMessage bindable property.

Declaration

cs-api-definition
public static readonly BindableProperty ValidationErrorMessageProperty

Field Value

BindableProperty

Properties

ActualValidationErrorMessage

Gets the actual error message that will be shown (in an error-label or a tooltip) when the value does not satisfy the mask requirements. When the ValidationErrorMessage property is set, the value of the ActualValidationErrorMessage property is the same as the ValidationErrorMessage. When the ValidationErrorMessage is not set, the value of the ActualValidationErrorMessage property contains a default error message.

Declaration

cs-api-definition
public string ActualValidationErrorMessage { get; }

Property Value

string

AllowNullValue

Gets or sets a value indicating whether the null value is accepted. When AllowNullValue is true the Value may be set to null programatically or by pressing the Clear button.

Declaration

cs-api-definition
public bool AllowNullValue { get; set; }

Property Value

bool

Implements IRadMaskedEntry.AllowNullValue

AllowPromptAsInput

Gets or sets a value indicating whether the prompt character should be treated as a valid input character or not.

Declaration

cs-api-definition
public bool AllowPromptAsInput { get; set; }

Property Value

bool

Implements IRadMaskedEntry.AllowPromptAsInput

ClearButtonStyle

Gets or sets a custom style that is to be applied to the clear button. The actual style that is applied is a merger between this style and the default clear button style.

Declaration

cs-api-definition
public Style ClearButtonStyle { get; set; }

Property Value

Style

ClearButtonVisibility

Gets or sets a value indicating when the clear-button (the button that clears the text when pressed) should be displayed.

Declaration

cs-api-definition
public ClearButtonVisibility ClearButtonVisibility { get; set; }

Property Value

ClearButtonVisibility

ControlTemplate

Gets or sets a value that specifies the visual structure of the Control.

Declaration

cs-api-definition
public ControlTemplate ControlTemplate { get; set; }

Property Value

ControlTemplate

Culture

Gets or sets a value indicating the culture this control will use for formatting and recognizing numbers, datetimes, timespans.

Declaration

cs-api-definition
public CultureInfo Culture { get; set; }

Property Value

CultureInfo

Implements IRadMaskedEntry.Culture

EntryBackgroundColor

Gets or sets the background color of the text-area of the masked entry.

Declaration

cs-api-definition
public Color EntryBackgroundColor { get; set; }

Property Value

Color

EntryCornerRadius

Gets or sets the corner radius of the text-area.

Declaration

cs-api-definition
public CornerRadius EntryCornerRadius { get; set; }

Property Value

CornerRadius

FontFamily

Gets or sets the font family of the text-area.

Declaration

cs-api-definition
public string FontFamily { get; set; }

Property Value

string

FontSize

Gets or sets the font size of the text-area.

Declaration

cs-api-definition
public double FontSize { get; set; }

Property Value

double

IsReadOnly

Gets or sets a value indicating whether the entry is in read-only mode. When this property is set to true, the end-user can only read the text and cannot type in the entry.

Declaration

cs-api-definition
public bool IsReadOnly { get; set; }

Property Value

bool

IsValueValid

Gets a value indicating whether the Value property satisfies the Mask requirements.

Declaration

cs-api-definition
public bool IsValueValid { get; }

Property Value

bool

Keyboard

Gets or sets the Keyboard that should be shown on mobile devices.

Declaration

cs-api-definition
[TypeConverter(typeof(KeyboardTypeConverter))]
public Keyboard Keyboard { get; set; }

Property Value

Keyboard

Implements IRadMaskedEntry.Keyboard

Mask

Gets or sets the mask string of the control. The Mask property is a string of characters that constrain user input. The Mask property may contain literals and special mask characters. The type of the masked entry determines how the mask characters are interpreted.

Declaration

cs-api-definition
public string Mask { get; set; }

Property Value

string

Implements IRadMaskedEntry.Mask

Placeholder

Gets or sets the placeholder text.

Declaration

cs-api-definition
public string Placeholder { get; set; }

Property Value

string

PromptChar

Gets or sets a value indicating the default (prompt) char. The PromptChar is the character that is displayed instead of a whitespace, and in blank spaces (not-yet-filled placeholders) in accordance to the Mask. By default the character is an underscore "_".

Declaration

cs-api-definition
public char PromptChar { get; set; }

Property Value

char

Implements IRadMaskedEntry.PromptChar

Text

Gets the text of the control.

Declaration

cs-api-definition
public string Text { get; }

Property Value

string

TextColor

Gets or sets the text color.

Declaration

cs-api-definition
public Color TextColor { get; set; }

Property Value

Color

ValidationErrorMessage

Gets or set the message that will be shown (in an error-label or a tooltip) when validation fails (i.e. the Value does not satisfy the Mask requirements). If the value of this property is null or empty a default error message is used.

Declaration

cs-api-definition
public string ValidationErrorMessage { get; set; }

Property Value

string

Methods

CreateLayoutManager()

Creates and returns a layout manager for arranging child elements within this masked entry control.

Declaration

cs-api-definition
protected override ILayoutManager CreateLayoutManager()

Returns

ILayoutManager

An ILayoutManager instance that manages the layout of child elements.

OnHandlerChanged()

Called when the handler for this view is changed. Updates the text input component to ensure proper handler association.

Declaration

cs-api-definition
protected override void OnHandlerChanged()

Events

ValueChanged

An event that is raised when the Value of the control has changed.

Declaration

cs-api-definition
public event EventHandler<MaskedEntryValueChangedEventArgs> ValueChanged

Event Value

EventHandler<MaskedEntryValueChangedEventArgs>

ValueChanging

An event that is raised when the Value property is about to change. You can use this event and its event args to interfere with the process of updating the value.

Declaration

cs-api-definition
public event EventHandler<MaskedEntryValueChangingEventArgs> ValueChanging

Event Value

EventHandler<MaskedEntryValueChangingEventArgs>