public App()
        {
            var mainWindowVm = new MainWindowViewModel();

            CultureInfo ci = new CultureInfo(mainWindowVm.SelectedLocale.ToString());
            Thread.CurrentThread.CurrentCulture = ci;
            Thread.CurrentThread.CurrentUICulture = ci;
        }
        public MainWindow()
        {
            InitializeComponent();

            ResourceFileCodeBehind.Text = (string) Application.Current.FindResource("localizedMessageCodeBehind");

            DataContext = new MainWindowViewModel();
        }
Esempio n. 3
0
 public MainWindow()
 {
     InitializeComponent();
     //IList li = new TestModel[] { };
     dg.CellEditEnding += dg_CellEditEnding;
     dg.RowEditEnding += dg_RowEditEnding;
     this.DataContext =viewModel= new MainWindowViewModel();
 }
Esempio n. 4
0
        protected void OnAppStartup(object sender, StartupEventArgs e)
        {
            WpfApplication1.MainWindowViewModel mwvm = new MainWindowViewModel();
            WpfApplication1.MainWindow mw = new WpfApplication1.MainWindow()
            {
                DataContext = mwvm,
            };

            mw.Show();

            Application.Current.MainWindow = mw;
        }
Esempio n. 5
0
 public MainWindow()
 {
     InitializeComponent();
       DataContext = new MainWindowViewModel();
 }
Esempio n. 6
0
 void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     DataContext = new MainWindowViewModel();
 }