0

I need to use a DialogBox called by a UserControl. Is it any possibility to call a DialogBox and return the result to the UserControl?

private void Button_Click_1(object sender, RoutedEventArgs e) {
            bool? result;

            Dialog1 dlg = new Dialog1();
            dlg.Owner = this;
            dlg.ShowDialog();
            //dlg.Show();

            result = dlg.DialogResult;
}

Supose that this button click event is inside a wpf UserControl. In this case I can't use "dlg.Owner = this;" to return the result to the caller.

Kreshnik
  • 2,661
  • 5
  • 31
  • 39

0 Answers0