I'm completely new to MVVM and Caliburn Micro. I had a program where the code was "behind" the MainWindow. I wanted to make it more responsive so I decided to try to use MVVM. The problem now is that when I click a button to start the program the whole window freezes, even the button stays in the clicked state. The program may take 30 minutes to run and regularly updates a log(TextBox) about the process but this is not seen until the program exits. I'm sure there is a simple fix for this, but I'm too new to this to figure it out. I've tried using CM 3.2 and 4.0.
Some code:
<Button Content="Do panorama" cal:Message.Attach="[Event Click] = [Action Panorama($source)]" Tag="PanDo"/>
public void Panorama(Button button)
{
// some code
}
public string PanLog
{
get { return _panLog; }
set { if (value == "") { _panLog = ""; } else { _panLog += DateTime.Now.ToString("yyyy-MM-dd - HH:mm:ss") + " : " + value + "\n"; ; } NotifyOfPropertyChange(() => PanLog); }
}