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(); }
public MainWindow() { InitializeComponent(); //IList li = new TestModel[] { }; dg.CellEditEnding += dg_CellEditEnding; dg.RowEditEnding += dg_RowEditEnding; this.DataContext =viewModel= new MainWindowViewModel(); }
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; }
public MainWindow() { InitializeComponent(); DataContext = new MainWindowViewModel(); }
void MainWindow_Loaded(object sender, RoutedEventArgs e) { DataContext = new MainWindowViewModel(); }