WPF XAML StringFormat DateTime: Output in wrong culture?

前端 未结 6 1562
南旧
南旧 2021-02-03 16:49

I\'m having some trouble with the output of a DateTime value. My computer\'s current culture is set to de-AT (Austria).

The following code

string s1 = Da         


        
6条回答
  •  Happy的楠姐
    2021-02-03 17:33

    Wrote about it some time ago on my blog:

    This will tell you how to get WPF to use the right culture:

    http://www.nbdtech.com/blog/archive/2009/02/22/wpf-data-binding-cheat-sheet-update-the-internationalization-fix.aspx

    This will change the WPF culture on the fly when you modify the settings in the control panel:

    http://www.nbdtech.com/blog/archive/2009/03/18/getting-a-wpf-application-to-pick-up-the-correct-regional.aspx

提交回复
热议问题