Framework Measure() method is not calculated the size properly While using the Relative source.
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### Description
I added a Label into the Grid in WPF and set its content using **RelativeSource** Binding. However, during calculation, the size was improperly determined in the **Measure()**, resulting in the content not being visible in the view. Interestingly, when I switched to using a static resource instead, the issue resolved, and the content displayed properly.
[RelativeSource.zip](https://github.com/dotnet/wpf/files/15200719/RelativeSource.zip)
### Reproduction Steps
Run the sample. The content of the label located in the middle is not being updated.

### Expected behavior
The content should be updated properly when binding with relative source.
### Actual behavior
The content is not updated in the view because of improperly calculated the size.
### Regression?
_No response_
### Known Workarounds
_No response_
### Impact
_No response_
### Configuration
_No response_
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.