ContentPanel subscribes to its own SizeChanged event
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 297
Description
### Description
ContentPanel subscribes to its own SizeChanged event
ContentPanel.cs, the backing panel for ContentView on Windows. In the constructor, someone added a subscription to the ContentPanel's _own_ SizeChanged event and handles it to update some border and clipping stuff. Any change in size of the ContentPanel is going to be preceded by a measure/arrange pass; any changes to the border or clipping size/shape should be handled during the arrange step. Handling it after SizeChanged risks kicking off a whole other measure/arrange pass, which is bad for performance. And worse, it might make the border/clipping lag behind the size/shape changes of the panel itself.
I'm not 100% certain this is wrong, but if there is a good reason to do it this way, then it absolutely needs to be called out in the comments, because it's weird.
Contributor guide
Assessment
This issue has not been assessed yet.