Example #1
0
        /// <summary>
        /// Listens for property change.
        /// </summary>
        /// <param name="property">Property.</param>
        /// <typeparam name="TViewModel">The 1st type parameter.</typeparam>
        protected void ListenForPropertyChange(Expression <Func <TViewModel, object> > property, Action callback)
        {
            var changeListener = new PropertyChangeListener();

            changeListener.Listen <TViewModel>(property, ViewModel, callback);
            _propertyChangeListeners.Add(changeListener);
        }
Example #2
0
        /// <summary>
        /// Listens for property change.
        /// </summary>
        /// <param name="property">Property.</param>
        /// <typeparam name="TViewModel">The 1st type parameter.</typeparam>
        protected void ListenForPropertyChange <TObject>(Expression <Func <TObject, object> > property, TObject obj, Action callback)
        {
            var changeListener = new PropertyChangeListener();

            changeListener.Listen <TObject>(property, obj, callback);
            _propertyChangeListeners.Add(changeListener);
        }