MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit
Nested dialog not visible after closing and reopening parent dialog
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C#
- Estrellas
- 16.3k
- Forks
- 3.5k
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 8
Descripción
### Bug explanation
When you close a parent dialog which has a nested dialog open, the nested dialog becomes invisible the next time you open the parent dialog, it prevents all input because only the nested dialog `PART_ContentCoverGrid` is visible:
https://github.com/user-attachments/assets/dab526c5-eae5-4ee2-98a3-2b884cadb849
This seems to work fine with `TransitionAssist.DisableTransitions="True"`:
https://github.com/user-attachments/assets/034231da-d54e-48c3-b3d8-89cd2375fa1d
Steps:
* Open `Root` dialog
* `Root` dialog opens `Inner` dialog
* Close `Root` dialog
* Reopen `Root` dialog
```csharp
public RootDialog RootDialog { get; } = new();
public MainWindow()
{
InitializeComponent();
_ = Application.Current.Dispatcher.InvokeAsync(async () =>
{
await Delay();
_ = DialogHost.Show(RootDialog);
await Delay();
RootDialog.OpenInnerDialog();
await Delay();
DialogHost.GetDialogSession(null)!.Close();
await Delay();
_ = DialogHost.Show(RootDialog);
});
static Task Delay() => Task.Delay(2000);
}
```
I'm not sure if this is even desired behavior, I assumed that all nested dialogs would close when parent is closed.
Hope I described the issue clearly, its a little bit hard to explain.
### Version
5.1.0
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza reproduciendo la secuencia del issue con DialogHost.Show, un diálogo anidado y las transiciones habilitadas; compárala con TransitionAssist.DisableTransitions="True". Rastrea el estado de DialogHost y del diálogo anidado durante el cierre y la reapertura del diálogo padre, y verifica después que el diálogo padre reabierto ya no deje visible únicamente PART_ContentCoverGrid ni bloquee la entrada.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp
- Área
- desktop
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100