Class BaseMaskDateProvider
A base provider used in all date and time related structures(DateTime, DateOnly, TimeOnly, TimeSpan)
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public abstract class BaseMaskDateProvider : IMaskProvider
Constructors
BaseMaskDateProvider(String, CultureInfo, RadMaskedEditBoxElement)
Initializes a new instance of the BaseMaskDateProvider class.
Declaration
public BaseMaskDateProvider(string mask, CultureInfo culture, RadMaskedEditBoxElement owner)
Parameters
|
System.String
mask
The mask. |
|
System.Globalization.CultureInfo
culture
The culture. |
|
RadMaskedEditBoxElement
owner
The owner. |
Fields
keyCounter
Declaration
protected int keyCounter
Field Value
|
System.Int32
|
oldSelectedIndex
Declaration
protected int oldSelectedIndex
Field Value
|
System.Int32
|
Properties
AutoSelectNextPart
Gets or sets a value indicating whether to automatically select the next part during the editing.
Declaration
public bool AutoSelectNextPart { get; set; }
Property Value
|
System.Boolean
|
Culture
Gets the culture that determines the value of the localizable separators and placeholders in the input mask.
Declaration
public CultureInfo Culture { get; }
Property Value
|
System.Globalization.CultureInfo
A System.Globalization.CultureInfo containing the culture information associated with the input mask. |
Implements
DateTimeFormatInfo
Gets or sets the DateTimeFormatInfo used to provide culture specific date and time parts.
Declaration
public DateTimeFormatInfo DateTimeFormatInfo { get; set; }
Property Value
|
System.Globalization.DateTimeFormatInfo
|
EnableKeyNavigation
IncludePrompt
This provider should not implement this property and should thrown an exception.
Declaration
public bool IncludePrompt { get; set; }
Property Value
|
System.Boolean
|
Implements
List
A list with MaskPart objects used to validate the value and user input.
Declaration
public List<MaskPart> List { get; set; }
Property Value
|
System.Collections.Generic.List<MaskPart>
|
Mask
Gets the input mask.
Declaration
public string Mask { get; protected set; }
Property Value
|
System.String
A System.String containing the full mask. |
Implements
MaskFromFormat
Gets or sets the mask based on the format string.
Declaration
public string MaskFromFormat { get; set; }
Property Value
|
System.String
|
Owner
Gets the owner RadMaskedEditBoxElement.
Declaration
public RadMaskedEditBoxElement Owner { get; }
Property Value
|
RadMaskedEditBoxElement
|
PromptChar
This provider should not implement this property and should thrown an exception.
Declaration
public char PromptChar { get; set; }
Property Value
|
System.Char
|
Implements
SelectedItemIndex
Gets or sets the index of the selected item of the List.
Declaration
public int SelectedItemIndex { get; set; }
Property Value
|
System.Int32
|
TextBoxItem
Gets the text box item.
Declaration
public RadTextBoxItem TextBoxItem { get; }
Property Value
|
RadTextBoxItem
|
Implements
Value
Gets or sets the value.
Declaration
public abstract object Value { get; set; }
Property Value
|
System.Object
|
Implements
Methods
AdjustItemsOffset()
Adjusts the offset of the items in the list.
Declaration
protected virtual void AdjustItemsOffset()
Click()
Occurs when the user clicks with the mouse.
Declaration
public virtual bool Click()
Returns
|
System.Boolean
Not used |
Implements
Clone()
Clones this instance.
Declaration
public abstract IMaskProvider Clone()
Returns
|
IMaskProvider
The cloned instance. |
Implements
Delete()
Raises the delete operation for currently selected mask part.
Declaration
public bool Delete()
Returns
|
System.Boolean
Not used. |
Implements
FillCollection()
Declaration
protected abstract void FillCollection()
FillCollectionWithValues()
Declaration
protected abstract void FillCollectionWithValues()
GetGroupLengthByMask(String)
Gets the group length of the mask.
Declaration
protected static int GetGroupLengthByMask(string mask)
Parameters
|
System.String
mask
|
Returns
|
System.Int32
The group length of the mask. |
KeyDown(Object, KeyEventArgs)
Occurs when a key is pressed.
Declaration
public abstract void KeyDown(object sender, KeyEventArgs e)
Parameters
|
System.Object
sender
The sender. |
|
System.Windows.Forms.KeyEventArgs
e
Key event arguments. |
Implements
KeyPress(Object, KeyPressEventArgs)
Occurs when a key is pressed.
Declaration
public abstract void KeyPress(object sender, KeyPressEventArgs e)
Parameters
|
System.Object
sender
The sender. |
|
System.Windows.Forms.KeyPressEventArgs
e
Key event arguments. |
Implements
ResetCurrentPartValue(Object, KeyEventArgs)
Resets the value of the currently selected part of the mask.
Declaration
public abstract void ResetCurrentPartValue(object sender, KeyEventArgs e)
Parameters
|
System.Object
sender
The sender. |
|
System.Windows.Forms.KeyEventArgs
e
Key event arguments. |
RestoreSelectedItem()
Restores the selected item from the List, usually after a value change operation.
Declaration
protected virtual void RestoreSelectedItem()
SelectCurrentItemFromCurrentCaret()
Selects the current MaskPart based on the caret position.
Declaration
public abstract bool SelectCurrentItemFromCurrentCaret()
Returns
|
System.Boolean
A value indicating whether a part was selected. |
SelectCurrentItemWithSelectedItem()
Selects the text in the TextBoxItem which corresponds to the SelectedItemIndex in the List.
Declaration
public abstract void SelectCurrentItemWithSelectedItem()
SelectFirstEditableItem()
Declaration
public virtual void SelectFirstEditableItem()
SelectFirstItem()
SelectLastEditableItem()
Declaration
public virtual void SelectLastEditableItem()
SelectLastItem()
SelectNextEditableItem()
Declaration
public virtual void SelectNextEditableItem()
SelectNextEditableItemFromCurrentCaret()
Selects the next editable MaskPart based on the caret position.
Declaration
public virtual bool SelectNextEditableItemFromCurrentCaret()
Returns
|
System.Boolean
A value indicating whether a part was selected. |
SelectNextItem()
Selects the next MaskPart based on the SelectedItemIndex.
Declaration
public virtual void SelectNextItem()
SelectNextItemFromCurrentCaret()
Selects the next MaskPart based on the caret position.
Declaration
public virtual void SelectNextItemFromCurrentCaret()
SelectPrevEditableItem()
Declaration
public virtual void SelectPrevEditableItem()
SelectPrevItem()
Selects the previous MaskPart based on the SelectedItemIndex.
Declaration
public virtual void SelectPrevItem()
SelectPrevItemFromCurrentCaret()
Selects the previous MaskPart based on the caret position.
Declaration
public virtual void SelectPrevItemFromCurrentCaret()
ToString(Boolean, Boolean)
Gets the string interpretation of the value based on the Mask
Declaration
public abstract string ToString(bool includePrompt, bool includeLiterals)
Parameters
|
System.Boolean
includePrompt
Not used. |
|
System.Boolean
includeLiterals
not used. |
Returns
|
System.String
The string interpretation of the value based on the mask. |
Implements
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
public abstract bool Validate(string value)
Parameters
|
System.String
value
THe string value that is about to be set to the Value. |
Returns
|
System.Boolean
A value indicating whether the string value is valid. |
Implements
Events
SelectedItemChanged
Occurs when the selected item is changed.
Declaration
public event EventHandler SelectedItemChanged
Event Type
|
System.EventHandler
|