Here is a binding expression I have
<TextBlock Text={Binding MyDateProp, StringFormat=d} />
My machine default culture is en-GB. In App.xaml.cs I override OnStartup
method like below
protected override void OnStartup(StartupEventArgs e)
{
var newCulture = new CultureInfo("ru-RU", true);
newCulture.DateTimeFormat.ShortDatePattern = "dd MMM yyyy";
Thread.CurrentThread.CurrentCulture = newCulture;
base.OnStartup(e);
}
I would like text to look like 01 Янв 2001
but it still shows me 1/1/2001
. What culture does binding use and how can I force it to use the culture I want?