private void sessionButton_Click(object sender, RoutedEventArgs e) { DialogoIngresar loginDialog = new DialogoIngresar() { LogInHandler = Ingresar }; loginDialog.Owner = this; loginDialog.ShowDialog(); }