We have practiced MVVM pattern.
We create two ICommand StartCommand and StopCommand
We use instrument status to decide enable/disable Start and Stop button.
When we use backgroundthread to get data from instrument simulator to update UI'status.
After clicking the Start button, we start the background thread to get instrument status.
The Stop button enable/disable does not get updat right way.
If we click the Window/view area, then the Stop button get update.
It looks like after click the window/view area, the CanStop function get called.
Does anybody know why?
Thx!
We create two ICommand StartCommand and StopCommand
public ICommand StartCommand { get { if (_StartCommand == null) { _StartCommand = new RelayCommand( param => this.Start(), param => this.CanStart ); } return _StartCommand; } }
We use instrument status to decide enable/disable Start and Stop button.
When we use backgroundthread to get data from instrument simulator to update UI'status.
After clicking the Start button, we start the background thread to get instrument status.
The Stop button enable/disable does not get updat right way.
If we click the Window/view area, then the Stop button get update.
It looks like after click the window/view area, the CanStop function get called.
Does anybody know why?
Thx!