title: WPF loading indicator when Entity Framework loads data
body: <p>When loading data from database with Entity Framework takes a long time I would like to show "loading" indicator on UI (WPF). For the indicator itself, I am using <a href="http://www.codeproject.com/Articles/57984/WPF-Loading-Wait-Adorner" rel="nofollow">WPF Loading Wait Adorner</a> as shown in the article.</p>
  
  <p>The indicator works fine but is not showing when Entity Framework loads data. In that case the indicator won't show at all on UI.</p>
  
  <p>I run this:</p>
  
  <pre><code>'show Adorner (loading indicator)
  LoadingAdorner.IsAdornerVisible = Not LoadingAdorner.IsAdornerVisible
  
  'read data from database with Entity Framework
  Persons = _context.persons
  
  'hide Adorner (loading indicator) after loading data is completed
  LoadingAdorner.IsAdornerVisible = Not LoadingAdorner.IsAdornerVisible
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;ac:AdornedControl Name="LoadingAdorner"&gt;
          &lt;ac:AdornedControl.AdornerContent&gt;
              &lt;local:LoadingWait&gt;&lt;/local:LoadingWait&gt;
          &lt;/ac:AdornedControl.AdornerContent&gt;
          &lt;ListBox&gt;
              ...code not shown
          &lt;/ListBox&gt;  
  &lt;/ac:AdornedControl&gt;  
  </code></pre>
  
  <p>Only after the data is loaded, the indicator becomes visible.
  What am I missing and how to show the indicator WHILE the data is loaded?</p>