skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class BaseMaskDateProvider

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

Inheritance
System.Object
BaseMaskDateProvider
MaskDateTimeProvider
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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
IMaskProvider.Culture

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

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

Declaration
public bool EnableKeyNavigation { get; set; }
Property Value
System.Boolean

IncludePrompt

This provider should not implement this property and should thrown an exception.

Declaration
public bool IncludePrompt { get; set; }
Property Value
System.Boolean

Implements
IMaskProvider.IncludePrompt

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
IMaskProvider.Mask

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
IMaskProvider.PromptChar

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
IMaskProvider.TextBoxItem

Value

Gets or sets the value.

Declaration
public abstract object Value { get; set; }
Property Value
System.Object

Implements
IMaskProvider.Value

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
IMaskProvider.Click()

Clone()

Clones this instance.

Declaration
public abstract IMaskProvider Clone()
Returns
IMaskProvider

The cloned instance.

Implements
IMaskProvider.Clone()

Delete()

Raises the delete operation for currently selected mask part.

Declaration
public bool Delete()
Returns
System.Boolean

Not used.

Implements
IMaskProvider.Delete()

FillCollection()

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

Declaration
protected abstract void FillCollection()

FillCollectionWithValues()

Fills the List with values based on the Value.

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
IMaskProvider.KeyDown(Object, KeyEventArgs)

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
IMaskProvider.KeyPress(Object, KeyPressEventArgs)

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()

Selects the first editable MaskPart in the List.

Declaration
public virtual void SelectFirstEditableItem()

SelectFirstItem()

Selects the first MaskPart in the List.

Declaration
public virtual void SelectFirstItem()

SelectLastEditableItem()

Selects the last editable MaskPart in the List.

Declaration
public virtual void SelectLastEditableItem()

SelectLastItem()

Selects the last MaskPart in the List.

Declaration
public virtual void SelectLastItem()

SelectNextEditableItem()

Selects the previous editable MaskPart in the List.

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()

Selects the previous editable MaskPart in the List.

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
IMaskProvider.ToString(Boolean, Boolean)

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
IMaskProvider.Validate(String)

Events

SelectedItemChanged

Occurs when the selected item is changed.

Declaration
public event EventHandler SelectedItemChanged
Event Type
System.EventHandler

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.