private void createButton_Click(object sender, RoutedEventArgs e) { DialogoCrearFactura dialogoCrear = new DialogoCrearFactura(api.Contribuyente) { CreateHandler = crearFactura }; dialogoCrear.Owner = this; dialogoCrear.ShowDialog(); }