I'm working on a multithreaded wpf application. To perform globalization i tried to set the current thread's(main thread) culture to invariant culturee in app.xaml.cs, So that all C# objects in app domain works on culture invariant info. But the problem arises when many threads comes to usage the worker threads invoked, those thread's culture are defaulted to OS Culture settings which i don't want. Help me in finding out a way where the worker threads created inherits the CultureInfo from main thread
相关问题
- VNC control for WPF application
- How to let a thread communicate with another activ
- Why it isn't advised to call the release() met
- WPF Binding from System.Windows.SystemParameters.P
- ThreadPoolTaskScheduler behaviour when pool is ful
I don't think there is a way to assign the culture to the entire AppDomain. Your best option might be to use a helper class to instantiate the threads.
Do this:
As you can see it this sets your default culture for both background and UI threads. If you drop this in your app.xaml then you should be all set.