MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit
ValidationAssist.Suppress does not affect textbox underline
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 16.3k
- フォーク
- 3.5k
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 8
説明
I am using the following style to suppress validation on disabled textboxes.
<Style x:Key="DefaultTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource MaterialDesignTextBox}">
<Style.Triggers>
<!-- Remove the errors when the control is disabled. -->
<Trigger Property="IsEnabled" Value="False">
<Setter Property="materialDesign:ValidationAssist.Suppress" Value="True"/>
<!--<Setter Property="BorderBrush" Value="{StaticResource MaterialDesignTextBoxBorder}"/>-->
</Trigger>
</Style.Triggers>
</Style>
Here is the result of that:

The red underline is still applied to the disabled textbox. The Error text is correctly hidden.
I worked around this by using the commented out setter for the BorderBrush. This is mostly just to make the behavior consistent with other controls. The Combobox does not require the workaround. I haven't tested any other controls either so it may be worth checking each one.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、検証エラーがある無効化された TextBox を使って、提供された XAML スタイルを再現し、その検証スタイルを ComboBox の動作と比較します。TextBox の検証テンプレートまたはスタイルを追跡し、検証を抑制すると赤い下線も削除される一方で、非表示のエラーテキストは保持されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- desktop
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100