コード例 #1
0
        public MainWindow()
        {
            InitializeComponent();
            vm = new ViewModel();
            vm._t1 = new Table1()
            {
                _FirstName = "前田"
            };

            this.DataContext = vm;
        }
コード例 #2
0
        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();
            };
        }
コード例 #3
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext = new ViewModel();
 }