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