dotnet / dotnet/wpf

Improve equalitycheck of DependencyObject.PropertyChanged

Open
#723 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

When changing DepdendencyProperties there is an equalitycheck to prevent unecessary events when the value is actually the same.

However, this is based on the Type of the DependencyProperty and uses `Object.Equals` for string and valuetypes and `Object.ReferenceEquals` for eveything else.

The problem is, that certain things fail the EqualityCheck that should actually not.

My suggestion is to extend this check to respect `IEquateable` and/or `IEquateable` to prevent unecessary changed events.

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.