-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Extend ViewModelBase IsBusy flag with increment/decrement counter.
public bool IsBusy
{
get
{
var count = Interlocked.CompareExchange(ref _busyRefCount, 0, 0);
return count > 0;
}
protected set
{
if (value)
{
Interlocked.Increment(ref _busyRefCount);
}
else
{
Interlocked.Decrement(ref _busyRefCount);
}
this.RaisePropertyChanged();
}
}