i have a problem i make a window application and using some Some Wpf user control on my Window Form i want to close my form When I close the user Control,Cancel button how can i achive it.....means i want to get the parent of usercontrol
+3
A:
The parent of the UserControl
you get with the Parent
-property. The window you can get directly with the Window.GetWindow
-method.
Window w=Window.GetWindow(this);
if(null != w){
w.Close();
}
HCL
2010-09-16 08:47:31