wpf popup does not work with WindowsFromsHost
-
Monday, December 15, 2008 7:10 PM
If I have a popup with windows forms control instead of a WPF control and the StaysOpen is set to 'false'. The first time I click on the windows forms control the popup closes. How can I fix this?
void m_TestButton_Click(object sender, RoutedEventArgs e)
private{
Button b = sender as Button; Popup popup = new Popup();{
WindowsFormsHost wf_host = new WindowsFormsHost();wf_host.Background =
SystemColors.ControlBrush;wf_host.Child =
new UserControl1();popup.Child = wf_host;
}
popup.Placement =
PlacementMode.Right;popup.StaysOpen =
false;popup.PlacementTarget = b;
popup.Width = 250;
popup.IsOpen =
true;}
All Replies
-
Tuesday, December 16, 2008 5:11 AMModerator
Hi,This forum is to support questions on Open specifications.
There are very helpful communities on MSDN that would provide a better assistance to answer your question.
Visual Studio WPF Designer
http://social.msdn.microsoft.com/Forums/en-US/vswpfdesigner/threads/
I would also suggest you start searching the forums in case someone has already asked a similar question.MSDN Forums
http://social.msdn.microsoft.com/Forums/en-US/categories/
Microsoft TechNet
http://forums.microsoft.com/TechNet/default.aspx?SiteID=17Thanks,
Edgar- Marked As Answer by Alex MorrillMicrosoft Employee, Owner Wednesday, December 17, 2008 10:31 PM
- Edited by Alex MorrillMicrosoft Employee, Owner Wednesday, December 17, 2008 10:32 PM removed Windows ref. - forum is for general interoperability