Exemplo n.º 1
0
 /// <summary>
 ///     Observes a property that implements INotifyPropertyChanged, and automatically calls
 ///     DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications.
 /// </summary>
 /// <typeparam name="T">The object type containing the property specified in the expression.</typeparam>
 /// <param name="propertyExpression">The property expression. Example: ObservesProperty(() => PropertyName).</param>
 protected internal void ObservesPropertyInternal <T>(Expression <Func <T> > propertyExpression)
 {
     AddPropertyToObserve(PropertySupport.ExtractPropertyName(propertyExpression));
     HookInpc(propertyExpression.Body as MemberExpression);
 }
Exemplo n.º 2
0
        protected virtual void OnPropertyChanged <T>(Expression <Func <T> > propertyExpression)
        {
            var propertyName = PropertySupport.ExtractPropertyName(propertyExpression);

            OnPropertyChanged(propertyName);
        }