public MainWindow()
        {
            InitializeComponent();
            vm = new ViewModel();
            vm._t1 = new Table1()
            {
                _FirstName = "前田"
            };

            this.DataContext = vm;
        }
        public MainWindow()
        {
            InitializeComponent();

            var viewModel = new ViewModel();
            DataContext = viewModel;

            Loaded += delegate {
                var thread = new Thread(() => {
                    while (true) {
                        Thread.Sleep(1000);
                        viewModel.Count++;
                    };
                }) {
                    IsBackground = true
                };
                thread.Start();
            };
        }
Esempio n. 3
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext = new ViewModel();
 }