title: Updating a progressbar with Caliburn Micro
body: <p>I keep reading how great Caliburn is at thread marshaling and how updating the UI thread is incredibly easy but I can't seem to get it to work nor can I find an example that shows it so I need help...</p>
  
  <p>Here is my XAML...</p>
  
  <pre><code>&lt;StackPanel Orientation="Vertical" HorizontalAlignment="Left"&gt;
      &lt;Label Content="Progress For Current File" /&gt;
      &lt;WrapPanel&gt;
          &lt;ProgressBar x:Name="CurrentFileProgress" Width="500" Height="25" Minimum="0" Maximum="1" /&gt;
          &lt;Label Content="1 of 25" /&gt;
      &lt;/WrapPanel&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>Here is my ViewModel...</p>
  
  <pre><code>public void Go()
  {
      var files = Directory.GetFiles(PathToFiles, "*.sql");
  
      CurrentFileProgress = 0;
  
      for (int iter = 1; iter &lt;= files.Length; iter++)
      {
          CurrentFileProgress = iter / (files.Length * 1.0f);
          System.Threading.Thread.Sleep(250);
  
      }
  }
  
  private double _CurrentFileProgress = 3; //For design time look
  
  public double CurrentFileProgress
  {
      get { return _CurrentFileProgress; }
      set
      {
          _CurrentFileProgress = value;
          NotifyOfPropertyChange(() =&gt; CurrentFileProgress);
      }
  }
  </code></pre>
  
  <p>This is simple enough and after a few seconds my progress bar is at 100% but it doesn't step like I would expect.</p>