MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

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

Aperta
#3,154 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug evaluation required
Lingua principale
C#
Stelle
16.3k
Fork
3.5k
Merge medio
1g 22h
PR unite (30g)
8

Descrizione

### 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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
desktop
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.