예제 #1
0
 private void Window_Loaded_1(object sender, RoutedEventArgs e)
 {
     ViewModels.MyViewModel VM = new ViewModels.MyViewModel(null);
     DataContext = VM;
     var textChanged = Observable.FromEventPattern<TextChangedEventHandler, TextChangedEventArgs>(
         handler => handler.Invoke,
         h => textBox3.TextChanged += h,
         h => textBox3.TextChanged -= h);
     textChanged.Subscribe(_ => VM.TextInput = textBox3.Text);
 }
        void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            ViewModels.MyViewModel VM = new ViewModels.MyViewModel(System.Reactive.Concurrency.Scheduler.Default);
            DataContext = VM;
            var textChanged = Observable.FromEventPattern <TextChangedEventHandler, TextChangedEventArgs>(
                handler => handler.Invoke,
                h => textBox3.TextChanged += h,
                h => textBox3.TextChanged -= h);

            textChanged.Subscribe(_ => VM.TextInput = textBox3.Text);
        }
예제 #3
0
        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            ViewModels.MyViewModel VM = new ViewModels.MyViewModel(null);
            DataContext = VM;
            var textChanged = Observable.FromEventPattern <TextChangedEventHandler, TextChangedEventArgs>(
                handler => handler.Invoke,
                h => textBox3.TextChanged += h,
                h => textBox3.TextChanged -= h);

            textChanged.Subscribe(_ => VM.TextInput = textBox3.Text);
        }