elementHost repaint problem in MDI application



Hi


I am having a refresh\repaint problem with the ElementHost control. I have
created a Windows Forms MDI application and inserted ElementHost on a child
form with a very simple XAML. When I move a child form out of MDI parent
working area, and then use MDI parent scroll bars to bring it back,
ElementHost located in a child form does not repaint itself and brings back
visual garbage!

Here are simple steps to reproduce my problem:

1). Create Windows Forms project and add a MDIParent form.

2). Add User Control (WPF) named UserControl1.xaml , leave it as is just
with <Grid></Grid> content.



3). Add Windows Form frm_Child, add ElementHost with Dock.Fill and specify
UserControl1.xaml as a child;



4). Use the following code in MDIParent



frm_Child childForm = new frm_Child();

childForm.MdiParent = this;

childForm.Text = "Window " + childFormNumber++;

childForm.Show();



Now, run application and, using pre-generated MDIParent toolbar, create
several child forms, move one out of the MDI working area, and use MDIParent
scrollbars to bring it back. All ElementHosts on all child forms will become
crazy, filled with parts and pieces of a visual garbage.

What am I missing? How can I made ElementHosts repaint correctly?

(I have posted that question on MSDN WPF Forums, but not geting any reply.
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/6f88715b-b9ca-4d4f-974b-97b334d26347/
Sorry, for duplicating my question).

.