title: How to repaint a WinFormsHost when it becomes visible?
body: <p>I've a winforms control within a WindowsFormsHost on a WPF control. The WPF control is only visible some of the time, and when it becomes visible the contents of the winforms control have usually changed.</p>
  
  <p>When the ViewModel for the WPF control changes I change the contents of the winforms control and the WPF control becomes visible.</p>
  
  <p>Unfortunately, the previous contents of the winforms control is repainted, as if from a visual cache. I've run it through the debugger and I know that the winforms control is having its data updated, but it won't repaint until I re-size the program window (when a repaint is clearly triggered).</p>
  
  <p>I've tried Invalidate() on the winforms control and InvalidateVisual(), InvalidateArrange() and InvalidateMeasure() on the WPF control inside the DataContextChanged event handler for the WPF control, but it seems that because the WPF control is not visible at this point (it's just about to become visible) these method calls are swallowed.</p>
  
  <p>Anyone got any clever ideas on how to force a repaint of a WinFormsHost-ed winforms control immediately after the hosting WPF control becomes visible?</p>