MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

Changing the language of a window breaks displaying child nodes of a TreeView

Abierto
#3,154 1 comentario 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

Changing the language of a window breaks displaying child nodes of a TreeView. I assume it has something to do with an UI update because it breaks in another app when different TreeViews are displayed. The only way I can reliably reproduce the issue is with the language change.

Here is a video demonstrating the issue. I also uploaded an [example app](https://github.com/reiseder/material-design-tree-view-bug).

https://user-images.githubusercontent.com/31562861/229203111-cf8afc11-aac1-4830-878d-4d41ee21e4e9.mp4

Using Snoop I figured out that this [binding](https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/blob/master/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TreeView.xaml#L359) breaks as it somehow references the wrong `ItemsHost` element.

I temporarily fixed the issue by changing the line from

```xml

```

to

```xml

```

I don't think that is the proper solution though.

### Version

4.6.1, 4.8.0

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

Start with MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TreeView.xaml at the binding around line 359, then reproduce the problem using the linked example app and its language-change scenario. Investigate why the binding references the wrong ItemsHost after the UI update; done means TreeView child nodes display correctly after changing the window language.

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
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.