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

オープン
#3,154 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
csharp
領域
desktop

調査の方向性

まず MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TreeView.xaml の359行目付近にある binding から始め、リンク先のサンプルアプリとその言語変更シナリオを使って問題を再現します。UI の更新後に binding が誤った ItemsHost を参照する理由を調査します。ウィンドウの言語を変更した後に TreeView の子ノードが正しく表示されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug evaluation required
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://user-images.githubusercontent.com/31562861/229203111-cf8afc11-aac1-4830-878d-4d41ee21e4e9.mp4

Using Snoop I figured out that this binding breaks as it somehow references the wrong ItemsHost element.

I temporarily fixed the issue by changing the line from

<Binding ElementName="ItemsHost" Path="ActualHeight" />

to

<Binding RelativeSource="{RelativeSource Mode=Self}" Path="Children[0].ActualHeight" />

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

Version

4.6.1, 4.8.0

主要言語
C#
スター
16.3k
フォーク
3.5k
平均マージ
4時間 25分
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MaterialDesignInXAML/MaterialDesignInXamlToolkit のほかの issue

MaterialDesignInXAML/MaterialDesignInXamlToolkit の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。