add IRaiseNotifyPropertyChanged interface (implement in ViewModelBase)
This commit is contained in:
1 parent
c9cf41e4ad
commit
f85b10a7df
1 file changed
+8
-1
@@ -12,7 +12,11 @@ using System.Collections.ObjectModel;
|
||||
|
||||
namespace mbts.ui.shell
|
||||
{
|
||||
public class ViewModelBase : INotifyPropertyChanged
|
||||
interface IRaiseNotifyPropertyChanged {
|
||||
void raise_notify_property_changed(string prop);
|
||||
}
|
||||
|
||||
public class ViewModelBase : INotifyPropertyChanged, IRaiseNotifyPropertyChanged
|
||||
{
|
||||
public ViewModelBase() {
|
||||
_props = new Lazy<PropertyInfo[]>(() => {
|
||||
@@ -31,6 +35,9 @@ namespace mbts.ui.shell
|
||||
}
|
||||
}
|
||||
|
||||
void IRaiseNotifyPropertyChanged.raise_notify_property_changed(string prop) =>
|
||||
RaisePropertyChanged(prop);
|
||||
|
||||
protected bool Set<T>(ref T dest, T value, [CallerMemberName]string name = "") where T : IEquatable<T> {
|
||||
if (!dest.Equals(value)) {
|
||||
dest = value;
|
||||
|
||||
Reference in new issue
Block a user