Closed CodingOctocat closed 11 months ago
report it in original repo
I found the solution:
<Style x:Key="MyTextBoxStyle"
BasedOn="{StaticResource TextBoxPlusBaseStyle}"
TargetType="{x:Type hc:TextBox}">
<Setter Property="ToolTip" Value="{Binding Text, RelativeSource={RelativeSource Self}}" />
<!-- Hide the validation error message, this solution does not work for ComboBox. -->
<Setter Property="Validation.ErrorTemplate" Value="{x:Null}" />
<Setter Property="b:TripleClickToSelectAllBehavior.Enabled" Value="True" />
<Setter Property="hc:InfoElement.ShowClearButton" Value="{Binding IsReadOnly, Converter={StaticResource Boolean2BooleanReConverter}, RelativeSource={RelativeSource Mode=Self}}" />
<Setter Property="hc:TitleElement.TitlePlacement" Value="Left" />
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="True">
<Setter Property="ToolTip" Value="{Binding (Validation.Errors), RelativeSource={RelativeSource Self}, Converter={StaticResource ValidationErrorsToolTipConverter}}" />
</Trigger>
</Style.Triggers>
</Style>
Describe the bug
I don't want the error message text, just the red outer box, so I set the error template to null:
HandyControl is as expected, but the HandyControls Border does not turn red brush.
NuGet package version
HandyControls (Custom version) 3.4.5
IDE
Visual Studio 2022
Framework type
.Net 7.0
Windows version
Windows 11 (22621)
Additional context
No response