title: Lazy loading System.Windows.Control.Image only when visible
body: <p>I need my application to render an image only when it becomes visible to the user.  I tried attaching.  I've tried the following (f#):</p>
  
  <pre><code>   image.IsVisibleChanged.Add(fun e -&gt;
          if image.IsVisible &amp; mtvCapture.Capture &lt;&gt; null then
              mtvCapture.BeginCapture()
          )
  </code></pre>
  
  <p>But this just loads, doesn't lazy load.  How does IsVisible work, will this only be true when the users scrolls the image element into view?</p>
  
  <p>Also tried modifying the binding source like so:</p>
  
  <pre><code>    public ImageSource ImageElementSource
      {
          get
          {
              if (Capture == null)
              {
                  BeginCapture();
                  return loadingImageSource;
              }
  
              CaptureToWpfImage();
              return imageElement.Source;
          }
      }
  </code></pre>
  
  <p>How can I have BeginCapture() be called only when image is scrolled into view?</p>