-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Framework Measure() method is not calculated the size properly While using the Relative source. #9076
Comments
OK, it really took me quite some time to understand your problem here. 😅 What we see here is expected. You have to know that Data binding features like I'm not really sure what you are trying to achieve in your code but usually you should not invoke WPF uses the concept of a So you could for example wrap your manual measuring into |
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
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
The text was updated successfully, but these errors were encountered: