Beispiel #1
0
        public static IDisposable ConnectINPCProperty <T>(this ObservableProperty <T> observableProperty,
                                                          INotifyPropertyChangedEx viewModel,
                                                          Expression <Func <T> > propertyExpression,
                                                          IDispatcherSchedulerProvider scheduler)
        {
            var propertyName = PropertyExtensions.ExtractPropertyName(propertyExpression);

            return(observableProperty.ValueChanged
                   .ObserveOn(scheduler.Dispatcher.RX)
                   .Subscribe(x => viewModel.ConnectINPC(propertyName)));
        }
Beispiel #2
0
 /// <summary>
 /// Raises this object's PropertyChanged event.
 ///
 /// </summary>
 /// <typeparam name="T">The type of the property that has a new value</typeparam>
 /// <param name="propertyExpression">A Lambda expression representing the property that has a new value.</param>
 protected void RaisePropertyChanged <T>(Expression <Func <T> > propertyExpression)
 {
     RaisePropertyChanged(PropertyExtensions.ExtractPropertyName(propertyExpression));
 }