Xceed DataGrid for WPF v7.2 Documentation
CustomFormatSpecifier Property (DateTimeTextBox)


Xceed.Wpf.Controls Assembly > Xceed.Wpf.Controls Namespace > DateTimeTextBox Class : CustomFormatSpecifier Property
Gets or sets the custom format specifier that will be used to mask the inputted text.
Syntax
'Declaration
 
Public Property CustomFormatSpecifier As String
'Usage
 
Dim instance As DateTimeTextBox

Dim value As String

 

instance.CustomFormatSpecifier = value

 

value = instance.CustomFormatSpecifier
public string CustomFormatSpecifier {get; set;}

Property Value

A string representing the custom format specifier that will be used to mask the inputted text. By default, a null reference (Nothing in Visual Basic).

Remarks

The custom format specifier will only be used if the DateTimeMaskMode property is set to DateTimeMaskMode.Custom.

The CustomFormatSpecifier only allows a subset of the rules found here:
https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings.

Here are the specific constraints:

  • the following specifiers are not allowed (streak length does not matter): 'f', 'F', 'g', 'G', 'K', 'z', '%'
  • the following specifiers are allowed, but the streak length cannot exceed 2: 'd', 'h', 'H', 'M', 'm', 's'
  • the following specifier is allowed, but the streak lenght must be 1, 2 or 4: 'y'
Requirements

Target Platforms: Windows 11, Windows, 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DateTimeTextBox Class
DateTimeTextBox Members