Contents

DateTimePicker.Culture Property

Notes

Gets or sets a System.Globilization.CultureInfo reference used to render country and/or language specific parts of the control.

Developers will rarely need to set this property explicitly, as it defaults to the System.Globilization.CultureInfo of the current thread or page.

As an example, note how the month names and default date formats below are Culture specific.

Example Display Format and Culture Control Display
LongDateFormat "D" for Swahili (Kenya) "sw-KE" Culture ,
LongDateFormat "D" for Spanish (Peru) "es-PE" Culture de de

Default value : System.Threading.Thread.CurrentThread.CurrentCulture.

More Subtle Notes...

The default Culture is that of System.Threading.Thread.CurrentThread.CurrentCulture. System.Threading.Thread.CurrentThread.CurrentCulture will be that of the server's default locale in Control Panel -> Regional Settings, unless it has been explicitly changed by the developer.

For example, you can set the Culture of an aspx page either by editing the <% Page  Culture="xx-YY"%> directive manually, or using the Visual Studio DOCUMENT property window.

Syntax

[Visual Basic]
Overridable Public Property Culture As System.Globalization.CultureInfo
[C#]
public virtual System.Globalization.CultureInfo Culture {get; set;}
[C++]
public: __property virtual System.Globalization.CultureInfo get_Culture();
public: __property virtual void set_Culture(System.Globalization.CultureInfo);
[JScript]
public function get Culture() : System.Globalization.CultureInfo;
public function set Culture(System.Globalization.CultureInfo);

See Also

DateTimePicker Contents | DateTimePicker Overview | DateTimePicker Members


Support | Feedback | Contact Dune5 | Website

© 2001-2010 Dune5. All Rights Reserved.