elementHost repaint problem in MDI application
- From: Victor <Victor@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 24 Dec 2008 19:16:00 -0800
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
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++;
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.
Sorry, for duplicating my question).
- Prev by Date: RE: multiple occurences of HandleCreated for a single control
- Next by Date: Enum is not clear
- Previous by thread: multiple occurences of HandleCreated for a single control
- Next by thread: Enum is not clear