Class
BaseMaskDateProvider

A base provider used in all date and time related structures(DateTime, DateOnly, TimeOnly, TimeSpan)

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

cs-api-definition
public abstract class BaseMaskDateProvider : IMaskProvider

Inheritance: objectBaseMaskDateProvider

Derived Classes: MaskDateTimeProvider

Implements: IMaskProvider

Constructors

BaseMaskDateProvider(string, CultureInfo, RadMaskedEditBoxElement)

Initializes a new instance of the BaseMaskDateProvider class.

Declaration

cs-api-definition
public BaseMaskDateProvider(string mask, CultureInfo culture, RadMaskedEditBoxElement owner)

Parameters

mask

string

The mask.

culture

CultureInfo

The culture.

owner

RadMaskedEditBoxElement

The owner.

Fields

keyCounter

Declaration

cs-api-definition
protected int keyCounter

Field Value

int

oldSelectedIndex

Declaration

cs-api-definition
protected int oldSelectedIndex

Field Value

int

Properties

AutoSelectNextPart

Gets or sets a value indicating whether to automatically select the next part during the editing.

Declaration

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

Property Value

bool

Culture

Gets the culture that determines the value of the localizable separators and placeholders in the input mask.

Declaration

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

Property Value

CultureInfo

A System.Globalization.CultureInfo containing the culture information associated with the input mask.

Implements IMaskProvider.Culture

DateTimeFormatInfo

Gets or sets the DateTimeFormatInfo used to provide culture specific date and time parts.

Declaration

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

Property Value

DateTimeFormatInfo

EnableKeyNavigation

Enable or Disable the selection of the next or prev. part of the date with arrow keys

Declaration

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

Property Value

bool

List

A list with MaskPart objects used to validate the value and user input.

Declaration

cs-api-definition
public List<MaskPart> List { get; set; }

Property Value

List<MaskPart>

Mask

Gets the input mask.

Declaration

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

Property Value

string

A string containing the full mask.

Implements IMaskProvider.Mask

MaskFromFormat

Gets or sets the mask based on the format string.

Declaration

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

Property Value

string

Owner

Gets the owner RadMaskedEditBoxElement.

Declaration

cs-api-definition
public RadMaskedEditBoxElement Owner { get; }

Property Value

RadMaskedEditBoxElement

SelectedItemIndex

Gets or sets the index of the selected item of the List.

Declaration

cs-api-definition
public int SelectedItemIndex { get; set; }

Property Value

int

TextBoxItem

Gets the text box item.

Declaration

cs-api-definition
public RadTextBoxItem TextBoxItem { get; }

Property Value

RadTextBoxItem

Implements IMaskProvider.TextBoxItem

Value

Gets or sets the value.

Declaration

cs-api-definition
public abstract object Value { get; set; }

Property Value

object

Implements IMaskProvider.Value

Methods

AdjustItemsOffset()

Adjusts the offset of the items in the list.

Declaration

cs-api-definition
protected virtual void AdjustItemsOffset()

Click()

Occurs when the user clicks with the mouse.

Declaration

cs-api-definition
public virtual bool Click()

Returns

bool

Not used

Implements IMaskProvider.Click()

Clone()

Clones this instance.

Declaration

cs-api-definition
public abstract IMaskProvider Clone()

Returns

IMaskProvider

The cloned instance.

Implements IMaskProvider.Clone()

Delete()

Raises the delete operation for currently selected mask part.

Declaration

cs-api-definition
public bool Delete()

Returns

bool

Not used.

Implements IMaskProvider.Delete()

FillCollection()

Fills the List with MaskPart objects used to validate the value and user input.

Declaration

cs-api-definition
protected abstract void FillCollection()

FillCollectionWithValues()

Fills the List with values based on the Value.

Declaration

cs-api-definition
protected abstract void FillCollectionWithValues()

GetGroupLengthByMask(string)

Gets the group length of the mask.

Declaration

cs-api-definition
protected static int GetGroupLengthByMask(string mask)

Parameters

mask

string

Returns

int

The group length of the mask.

KeyDown(object, KeyEventArgs)

Occurs when a key is pressed.

Declaration

cs-api-definition
public abstract void KeyDown(object sender, KeyEventArgs e)

Parameters

sender

object

The sender.

e

KeyEventArgs

Key event arguments.

Implements IMaskProvider.KeyDown(object, KeyEventArgs)

KeyPress(object, KeyPressEventArgs)

Occurs when a key is pressed.

Declaration

cs-api-definition
public abstract void KeyPress(object sender, KeyPressEventArgs e)

Parameters

sender

object

The sender.

e

KeyPressEventArgs

Key event arguments.

Implements IMaskProvider.KeyPress(object, KeyPressEventArgs)

ResetCurrentPartValue(object, KeyEventArgs)

Resets the value of the currently selected part of the mask.

Declaration

cs-api-definition
public abstract void ResetCurrentPartValue(object sender, KeyEventArgs e)

Parameters

sender

object

The sender.

e

KeyEventArgs

Key event arguments.

RestoreSelectedItem()

Restores the selected item from the List, usually after a value change operation.

Declaration

cs-api-definition
protected virtual void RestoreSelectedItem()

SelectCurrentItemFromCurrentCaret()

Selects the current MaskPart based on the caret position.

Declaration

cs-api-definition
public abstract bool SelectCurrentItemFromCurrentCaret()

Returns

bool

A value indicating whether a part was selected.

SelectCurrentItemWithSelectedItem()

Selects the text in the TextBoxItem which corresponds to the SelectedItemIndex in the List.

Declaration

cs-api-definition
public abstract void SelectCurrentItemWithSelectedItem()

SelectFirstEditableItem()

Selects the first editable MaskPart in the List.

Declaration

cs-api-definition
public virtual void SelectFirstEditableItem()

SelectFirstItem()

Selects the first MaskPart in the List.

Declaration

cs-api-definition
public virtual void SelectFirstItem()

SelectLastEditableItem()

Selects the last editable MaskPart in the List.

Declaration

cs-api-definition
public virtual void SelectLastEditableItem()

SelectLastItem()

Selects the last MaskPart in the List.

Declaration

cs-api-definition
public virtual void SelectLastItem()

SelectNextEditableItem()

Selects the previous editable MaskPart in the List.

Declaration

cs-api-definition
public virtual void SelectNextEditableItem()

SelectNextEditableItemFromCurrentCaret()

Selects the next editable MaskPart based on the caret position.

Declaration

cs-api-definition
public virtual bool SelectNextEditableItemFromCurrentCaret()

Returns

bool

A value indicating whether a part was selected.

SelectNextItem()

Selects the next MaskPart based on the SelectedItemIndex.

Declaration

cs-api-definition
public virtual void SelectNextItem()

SelectNextItemFromCurrentCaret()

Selects the next MaskPart based on the caret position.

Declaration

cs-api-definition
public virtual void SelectNextItemFromCurrentCaret()

SelectPrevEditableItem()

Selects the previous editable MaskPart in the List.

Declaration

cs-api-definition
public virtual void SelectPrevEditableItem()

SelectPrevItem()

Selects the previous MaskPart based on the SelectedItemIndex.

Declaration

cs-api-definition
public virtual void SelectPrevItem()

SelectPrevItemFromCurrentCaret()

Selects the previous MaskPart based on the caret position.

Declaration

cs-api-definition
public virtual void SelectPrevItemFromCurrentCaret()

ToString(bool, bool)

Gets the string interpretation of the value based on the Mask

Declaration

cs-api-definition
public abstract string ToString(bool includePrompt, bool includeLiterals)

Parameters

includePrompt

bool

Not used.

includeLiterals

bool

not used.

Returns

string

The string interpretation of the value based on the mask.

Implements IMaskProvider.ToString(bool, bool)

Validate(string)

Validates the given string value and sets it as Value if the value is valid. If the value cannot be parsed to the underlying data type of the Value, it is reset to its default value.

Declaration

cs-api-definition
public abstract bool Validate(string value)

Parameters

value

string

THe string value that is about to be set to the Value.

Returns

bool

A value indicating whether the string value is valid.

Implements IMaskProvider.Validate(string)

Events

SelectedItemChanged

Occurs when the selected item is changed.

Declaration

cs-api-definition
public event EventHandler SelectedItemChanged

Event Value

EventHandler