Skip to content

DangerBrush for TextBox not visible #1382

@dthoeni

Description

@dthoeni

In the latest release a TextBox inside A GridView wont get rendered with a red border on error.
I suspect this bug was introduced with the following commit:

Commit: 8e707a6 [8e707a6]
Parents: 322e366
Author: NaBian 836904362@qq.com
Date: Montag, 23. Jänner 2023 22:27:50
Committer: NaBian
Commit Date: Sonntag, 29. Jänner 2023 23:49:17
enhance: optimize input elements.

Update:
I figured out, that this problem is caused by changes to The TextBoxPlus_(Top/Left)_Template.
The border element was moved into a Grid and is not visible anymore.

Steps to reproduce the bug

Put a handyControl:TextBox inside a DataGrid and provoke a ValidationError

<DataGridTemplateColumn Header="Name"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <hc:TextBox MinWidth="75" hc:InfoElement.ShowClearButton="True" Text="{Binding Name, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}"/> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn>

Expected behavior

Like in release 3.4.4 DangerBrush should be applied to the control.

Screenshots

Previously
image

Now
image

NuGet package version

HandyControl 3.4.0

IDE

Visual Studio 2022

Framework type

.Net 6.0

Windows version

Windows 11 (22000)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions