DataGrid ComboBox: keyboard-focused item uses an undefined brush key (MaterialDesign.Brush.TextBox.ComboBoxHover)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 88/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- csharp
- 領域
- desktop-dev
調査の方向性
問題は src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DataGrid.ComboBox.xaml の60行目付近、アイテムコンテナーテンプレートのキーボードフォーカス用 MultiTrigger にあります。そこで使われているキーを、53行目のマウスオーバー用トリガーのキーと比較し、MaterialDesignTheme.Light.xaml と Dark.xaml の両方で定義されているか確認してください。矢印キーでフォーカスを移動したときに、フォーカスされた項目がハイライトされれば完了です。サンプルアプリの DataGrid ComboBox を実行して確認できます。
索引モデルが issue の本文から書いたものです。
説明
Bug explanation
src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DataGrid.ComboBox.xaml, line 60, in the item container template of the DataGrid ComboBox:
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="False" />
<Condition Property="IsKeyboardFocused" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource MaterialDesign.Brush.TextBox.ComboBoxHover}" />
</MultiTrigger>
No resource with the key MaterialDesign.Brush.TextBox.ComboBoxHover is defined anywhere in the repository (GitHub code search finds only this line). The trigger right above it — the mouse-over case, line 53 — uses MaterialDesign.Brush.DataGrid.ComboBoxHover, which is defined in both MaterialDesignTheme.Light.xaml and MaterialDesignTheme.Dark.xaml (line 39), and lines 171 and 297 use the same key. So this looks like the keyboard-focus trigger was meant to use it too.
Since it is a DynamicResource, nothing throws: the background just doesn't change when an item gets keyboard focus, so someone moving through the dropdown with the arrow keys gets no highlight on the focused item. I found this by reading the source and haven't run it, so apologies if I'm missing something.
Suggested change (line 60):
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource MaterialDesign.Brush.DataGrid.ComboBoxHover}" />
The line is the same in 5.4.0 and on master at 0877280.
Found with XamlKeys, a static checker for XAML resource keys I'm working on.
Version
5.4.0
- 主要言語
- C#
- スター
- 16.3k
- フォーク
- 3.5k
- 平均マージ
- 4時間 25分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MaterialDesignInXAML/MaterialDesignInXamlToolkit のほかの issue
-
MaterialDesignChoiceChipListBoxItem missing 'Path=Name' in GroupName binding causes selection conflict between ListBoxes対応中かも @corvinsz が 12 日前に担当しました。 オープンbug evaluation required
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
MaterialDesignInXAML/MaterialDesignInXamlToolkit#4118 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement up-for-grabs
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
MaterialDesignInXAML/MaterialDesignInXamlToolkit#2485 ·
メンテナーはふだん 1 日以内に返信
-
enhancement evaluation required
難易度 3/5 半日 初心者へのやさしさ 30/100
MaterialDesignInXAML/MaterialDesignInXamlToolkit#4120 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Add Semantic, Theme-Aware Colors対応中かも @corvinsz が 22 日前に担当しました。 オープンenhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
MaterialDesignInXAML/MaterialDesignInXamlToolkit#4114 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Feature Request] Proposals for input/display improvements and hexadecimal support in NumericUpDownオープンenhancement evaluation required
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
MaterialDesignInXAML/MaterialDesignInXamlToolkit#4108 ·
メンテナーはふだん 1 日以内に返信
MaterialDesignInXAML/MaterialDesignInXamlToolkit の issue をすべて見る
似ている issue
-
area / templates
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
bitfoundation/bitplatform#15109 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
aikido critical security
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
dequelabs/axe-core-nuget#305 ·
-
:watch: Not Triaged dotnet-fundamentals/svc install/subsvc
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信