This topic has not yet been rated - Rate this topic

DatePickerFormat Enumeration

Specifies date formats for a DatePicker.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls (in System.Windows.Controls.dll)
public enum DatePickerFormat
<object property="enumMemberName"/>
Member name Description
Long Specifies that the date should be displayed using unabbreviated days of the week and month names.
Short Specifies that the date should be displayed using abbreviated days of the week and month names.

The following XAML creates two DatePicker controls, one using the default Short format and the other using the Long format. This example is part of a larger example available in the DatePicker overview.


<!-- Two DatePicker controls, one using the default Short date format -->
<!-- and the other using the Long date format. -->
<StackPanel Orientation="Horizontal" >
<TextBlock Width="200" Margin="5" 
           Text="DatePicker with Short date format and Calendar event handlers:" TextWrapping="Wrap" />
<sdk:DatePicker x:Name="dp1" Height="20" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" >
<TextBlock Width="200" Margin="5"
           Text="DatePicker with Long date format and DateSelected event handler:" TextWrapping="Wrap" />
<sdk:DatePicker Height="20" x:Name="dp2" SelectedDateFormat="Long" Width="200"/>
</StackPanel>


Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ