Use “real” CultureInfo.CurrentCulture in WPF Binding, not CultureInfo from IetfLanguageTag

前端 未结 9 868
余生分开走
余生分开走 2020-11-29 05:19

In my case:

I have a TextBlock Binding to a property of type DateTime. I want it to be displayed as the Regional settings of the User says.



        
9条回答
  •  日久生厌
    2020-11-29 05:46

    How about changing the lanaguge in the code behind?

    this.Language = XmlLanguage.GetLanguage(Thread.CurrentThread.CurrentCulture.Name);
    

提交回复
热议问题