Xceed Grid for WinForms v4.3 Documentation
DisplayFormatSpecifier Property (WinDatePicker)
Example 


Xceed.Editors.v2.6 Assembly > Xceed.Editors Namespace > WinDatePicker Class : DisplayFormatSpecifier Property
Gets or sets the format specifier that will be used to display the date picker's Value.
Syntax
'Declaration
 
<CategoryAttribute("Appearance")>
<DescriptionAttribute("The format specifier that will be used to display the date picker's Value.")>
<TypeConverterAttribute("Xceed.Editors.Design.DateFormatSpecifierConverter,Xceed.Editors.v2.6.Design,Version=2.6.20076.12375,Culture=neutral,PublicKeyToken=ba83ff368b7563c6")>
<DefaultValueAttribute("")>
<LocalizableAttribute(True)>
Public Property DisplayFormatSpecifier As String
'Usage
 
Dim instance As WinDatePicker
Dim value As String
 
instance.DisplayFormatSpecifier = value
 
value = instance.DisplayFormatSpecifier
[Category("Appearance")]
[Description("The format specifier that will be used to display the date picker's Value.")]
[TypeConverter("Xceed.Editors.Design.DateFormatSpecifierConverter,Xceed.Editors.v2.6.Design,Version=2.6.20076.12375,Culture=neutral,PublicKeyToken=ba83ff368b7563c6")]
[DefaultValue("")]
[Localizable(true)]
public string DisplayFormatSpecifier {get; set;}

Property Value

A string representing the format specifier that will be used to display the date picker's Value.
Remarks

The list of values that can be passed to the DisplayFormatSpecifier property can be found in the "DisplayFormat Specifiers and DisplayFormat Providers" topic of the .NET Framework.

The display format specifier can differ from the EditFormatSpecifier.

Example
The following examples demonstrate how to set the DisplayFormatSpecifier property.
' Short date
winDatePicker1.DisplayFormatSpecifier = "d"

' Long date
winDatePicker1.DisplayFormatSpecifier = "D"
    
' Custom format (single quotes will be used as literals )  
winDatePicker1.DisplayFormatSpecifier = "'Year' yyyy 'Month' MM 'Day' dd"
// Short date
winDatePicker1.DisplayFormatSpecifier = "d";

// Long date
winDatePicker1.DisplayFormatSpecifier = "D";

// Custom format (single quotes will be used as literals )
winDatePicker1.DisplayFormatSpecifier = "'Year' yyyy 'Month' MM 'Day' dd";
Requirements

Target Platforms: 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

WinDatePicker Class
WinDatePicker Members