■ Thread 클래스의 CurrentThread 정적 속성을 사용해 특정 문화권을 설정하는 방법을 보여준다.
▶ MainApplication.xaml.cs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
using System.Globalization; using System.Threading; using System.Windows; namespace TestProject { /// <summary> /// 메인 애플리케이션 /// </summary> public partial class MainApplication : Application { //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor ////////////////////////////////////////////////////////////////////////////////////////// Public #region 생성자 - MainApplication() /// <summary> /// 생성자 /// </summary> public MainApplication() { CultureInfo cultureInfo = new CultureInfo("fr-CA"); Thread.CurrentThread.CurrentCulture = cultureInfo; Thread.CurrentThread.CurrentUICulture = cultureInfo; } #endregion } } |