/// <summary> /// Sets the value of a property. /// </summary> /// <typeparam name="T">The type parameter of the value to be set.</typeparam> /// <param name="propertyKey">The key that corresponds to the property to be set.</param> /// <param name="value">The value to be set.</param> protected void SetPropertyValue <T>(ViewModelPropertyKey propertyKey, T value) { if (propertyKey == null) { throw new ArgumentNullException("propertyKey"); } SetPropertyValue <T>(propertyKey.PropertyName, value); }
/// <summary> /// Raises the PropertyChanged event for the specified property. /// </summary> /// <param name="propertyKey">The property key that corresponds to the property to raise the event for.</param> protected internal void RaisePropertyChanged(ViewModelPropertyKey propertyKey) { if (propertyKey == null) { throw new ArgumentNullException("propertyKey"); } RaisePropertyChanged(propertyKey.PropertyName); }
/// <summary> /// Gets the value of a property. /// </summary> /// <typeparam name="T">The type to return the value as.</typeparam> /// <param name="propertyKey">The key that corresponds to a property.</param> /// <returns></returns> protected T GetPropertyValue <T>(ViewModelPropertyKey propertyKey) { if (propertyKey == null) { throw new ArgumentNullException("propertyKey"); } return(GetPropertyValue <T>(propertyKey.PropertyName)); }