title: ItemsControl won't re-render after showing a Popup on it
body: <p>I have an <strong>ItemsControl</strong> on a Window one of the column of which contains a simple very narrow StackPanel that serves just as a Target for a <strong>Popup</strong> which is shown under certain circumstances.</p>
  
  <p>After the has been shown and the user has been informed about something, the user closes this <strong>Popup</strong> by means of a button (the command bound to this button just sets the property of the view model to which <strong>Popup.IsOpen</strong> is bound to <strong>false</strong>).</p>
  
  <p>The <strong>Popup</strong> closes, but its image remains imprinted on the <strong>ItemsControl</strong> until it is scrolled or another window overlaps it.</p>
  
  <p>How to <em>repaint</em> the <strong>ItemsControl</strong> after the <strong>Popup</strong> has been closed?</p>
  
  <p>Code:</p>
  
  <p>1) ItemsControl</p>
  
  <pre><code>&lt;ScrollViewer ...&gt;
    &lt;ItemsControl x:Name="ux_List" ItemTemplate="{DynamicResource Lib_ItemTemplate}" ItemsSource="{Binding Path=TemplateInfos,Mode=OneWay}" AlternationCount="2" ... /&gt;
  </code></pre>
  
  <p>2) Item template</p>
  
  <pre><code>&lt;DataTemplate x:Key="Lib_ItemTemplate"&gt;
    &lt;Grid x:Name="grid"&gt;
  ...
      &lt;StackPanel Grid.Column="1"&gt;
         &lt;Popup IsOpen="{Binding Path=HasError,Mode=OneWay}"&gt;
            &lt;ContentPresenter Content="{Binding Path=ErrorContext, Mode=OneWay}"
  </code></pre>
  
  <p>and there's a close button inside the presenter in the last line of the snippet above:</p>
  
  <pre><code>&lt;Button ... Command="{TemplateBinding CloseButtonCommand}" /&gt;
  </code></pre>
  
  <p>A command is bound to this button implemented like this:</p>
  
  <pre><code>private void OnCloseErrorMessageCommand()
  {
      HasError = false;
      ...
  }
  </code></pre>