WPF, Winform, SQL etc
Tuesday, January 29, 2013
Find Window where UserControl is hosted
public
partial
class
PopupUserControl
:
UserControl
{
private
void
btnOK_Click(
object
sender,
RoutedEventArgs
e)
{
var owner =
Window
.GetWindow(
this
);
owner
.Close();
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment