diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/ViewModel.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/ViewModel.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs b/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs index 421e098ce..564d8fce0 100644 --- a/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs +++ b/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs @@ -41,7 +41,7 @@ namespace Tango.SharedUI public bool IsBusy { get { return _isBusy; } - set { _isBusy = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(IsFree)); InvalidateRelayCommands(); } + set { _isBusy = value; RaisePropertyChanged(nameof(IsBusy), true); RaisePropertyChanged(nameof(IsFree), true); InvalidateRelayCommands(); } } /// <summary> @@ -172,6 +172,18 @@ namespace Tango.SharedUI { TangoMessenger.Default.Register<T>(handler); } + + /// <summary> + /// Raises the property changed event. + /// </summary> + /// <param name="propName">Name of the property.</param> + protected virtual void RaisePropertyChanged(String propName, bool onUIThread) + { + InvokeUI(() => + { + RaisePropertyChanged(propName); + }); + } } /// <summary> |
