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(); }; }
public MainWindow() { InitializeComponent(); DataContext = new ViewModel(); }