dotnet / dotnet/wpf

Red border doesn't disappear with INotifyDataErrorInfo

Open
#8,969 4 comments 2 reactions 0 assignees View on GitHub
Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Red-border-doesnt-disappear-with-INotif/10619035)._

---
I have attached a simple project reproducing the issue.

The issue is that the red border (meaning there is an error) remains on my control even though error is cleared.

In a WPF app, I have a “MainWindow”, containing a “TestContainer” view (using a ContentControl), containing a “TestUserControl” view.

In the TestUserControlViewModel, when the OutsideString dependency property is set, I clear the error manually. But this is not taken into account and the red border remains --> NOK

If I add a button to the UI to clear the error, then it works and the red border disappears.

It looks like a bug in the framework.

Do you have any idea ?

[WpfApp1.zip](https://aka.ms/dc/file?name=B24bda9cdc4de4768993e043a61ee4da0638464372336271041_WpfApp1.zip&tid=24bda9cdc4de4768993e043a61ee4da0638464372336271041)

---
### Original Comments

#### Feedback Bot on 3/19/2024, 07:17 PM:

(private comment, text removed)
#### Ann Yang [MSFT] on 3/20/2024, 00:28 AM:

(private comment, text removed)
#### Nicolas Géré on 3/20/2024, 03:02 AM:

(private comment, text removed)
#### Feedback Bot on 3/26/2024, 01:43 AM:

(private comment, text removed)

---
### Original Solutions
(no solutions)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.