You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ProgressBarMVVMSample.Model
|
|
|
|
|
{
|
|
|
|
|
internal class BindableBase : INotifyPropertyChanged
|
|
|
|
|
{
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
|
|
|
|
|
|
protected bool SetProperty<T>(ref T storage, T value, [CallerMemberName] string propertyName = null)
|
|
|
|
|
{
|
|
|
|
|
if (Equals(storage, value))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
storage = value;
|
|
|
|
|
this.OnPropertyChanged(propertyName);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|
|
|
|
{
|
|
|
|
|
if (this.PropertyChanged == null)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|