AbstractDCMapperVM erweitert -> Bessere FirePropertyChanged Syntax für abhängige Eigenschaften
This commit is contained in:
@@ -85,6 +85,21 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
protected bool SetProperty<T>(ref T field, T value, string propertyName, Func<T> originalValueProvider = null, params string[] morePropertyNames)
|
||||
{
|
||||
var success = SetProperty<T>(ref field, value, propertyName, originalValueProvider);
|
||||
|
||||
if (success)
|
||||
{
|
||||
foreach (var morePropertyName in morePropertyNames)
|
||||
{
|
||||
FirePropertyChanged(morePropertyName);
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
protected new bool SetProperty<T>(ref T field, T value, string propertyName, Func<T> originalValueProvider = null)
|
||||
{
|
||||
if (EqualityComparer<T>.Default.Equals(field, value))
|
||||
|
||||
Reference in New Issue
Block a user