You can define any event in the class of the child window and subscribe to it before showing the window.
Main window
public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); this.Loaded += new RoutedEventHandler(MainWindow_Loaded); } void MainWindow_Loaded(object sender, RoutedEventArgs e) { Child childWindow = new Child(); childWindow.MyEvent += new EventHandler(childWindow_MyEvent); childWindow.ShowDialog(); } void childWindow_MyEvent(object sender, EventArgs e) {
child window
public partial class Child : Window {
source share