English 中文(简体)
日 本表
原标题:Silverlight Date Formats

我在我的银星应用中看到一些非常奇怪的日期格式问题。 我的当地文化是留给联合王国的,但我始终看到,美国的日期遍及各地。 我可以很容易地将这些内容输入到联合王国,以使用:

<UserControl ... Language="en-GB"...>

但正如我相信大家同意的那样,这是一件可怕的事情。

我已尝试在主要应用中设置Lanaguageen-GB,这取得了部分成功。 我还尝试了Justin Angels的建议(以下引文:)。 如何改变银星控制的日期格式?,再次只是部分成功。

这个问题的例子可以在这里看到:

括号上的数据网显示联合王国的编排格式,而“儿童寡妇”中的信息显示美国的格式......傲慢。

人人都有彻底解决这一问题的办法?

Thanks, Mark

最佳回答

您能否不使用日期cker的选定DateFormat财产? 如果你想这样做,那么你会无法建立源自最初的、具有这一价值预兆的用户控制,然后在你整个任期内使用你的衍生控制?

祝福

丹麦

问题回答

黑暗中,但改变浏览器语言优惠却有不同之处? I.e. in IE Technologies->Internet Options->Languages.

HTH

标记

在申请启动活动中,你可以确定整个申请的日期格式如下。 这将超越用户机器上的任何区域环境

        Thread.CurrentThread.CurrentCulture = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();
        Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern = dd/MM/yyyy";




相关问题
Weird Time Issue in Python

Problem with using times in Python. Terminal > Python >>> calendar.timegm(datetime.datetime.now().utctimetuple()) 1258449380 This time indicates GMT: Tue, 17 Nov 2009 09:16:20 GMT Eclipse ...

How does a .NET process get the culture information?

I have a Windows service running (C#, .NET 2.0) on Windows Server 2003 R2. In one server the System.Threading.Thread.CurrentThread.CurrentCulture is {en-AU} and in the other {en-US}. This has caused a ...

Best way to get maximum Date value in java?

I m writing a bit of logic that requires treating null dates as meaning forever in the future (the date in question is an expiration date, which may or may not exist). Instead of putting in special ...

Date format in SQL Server

Short Question: What s the best date format to use in SQL Server? Long Explanation: We re converting our database from mysql to SQL Server. In mysql we always used int(11) to avoid the daylight ...

Converting asp.net/sql web app to be ime zone savy

Our current app stores all dates via the server s datetime. I m thinking we need to update all datetime values in the database over to UTC time. Now for displaying these dates back to the user, I ...

Check if string is of SortableDateTimePattern format

Is there any way I can easily check if a string conforms to the SortableDateTimePattern ("s"), or do I need to write a regular expression? I ve got a form where users can input a copyright date (as a ...

DateTime in PropertyGrid in .Net

I m currently working on some DateTime properties in a PropertyGrid in c#.Net. Im using the default drop-down datetime picker. My question: Is there any way to show the full date with the time? By ...

热门标签