MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

DialogHost IsLoaded but not exactly

Abierto
#3,804 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug evaluation required
Lenguaje dominante
C#
Estrellas
16.3k
Forks
3.5k
Merge medio
1 d 22 h
PR fusionados (30 d)
8

Descripción

Bug explanation

I've uploaded a sample project illustrating the issue.

When trying to get a WPF window to open a view using DialogHost on initial startup/show, I noticed that the DialogHost.Show method throws an exception even though the DialogHost instance IsLoaded property was true. I am thinking the DialogHost is loaded but not yet registered in the LoadedInstances HashSet by the time the Window.IsLoaded event triggers.

https://github.com/jbooth88/DialogHostStartupExample

Looks like IsLoaded property is coming from FrameworkElement, so my guess here is that it's not the correct value to identify whether or not the DialogHost is fully initialized. I am not sure of the best way to solve this problem.

Version

5.2.1

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza reproduciendo la secuencia de inicio con el proyecto vinculado DialogHostStartupExample e inspecciona DialogHost.Show, FrameworkElement.IsLoaded y el HashSet LoadedInstances. Determina por qué Show puede ejecutarse antes de que se complete el registro y, después, verifica el fix con el escenario de apertura de la ventana/vista inicial descrito en el issue.

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
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.