Why does the Parent property of a container of an ItemsControl return null and not the Panel it sits on?
问题 This one has me stumped. We have a custom ItemsControl which uses both custom containers as well as a custom panel as its ItemsHost. Now the panel has some metrics that the containers need for rendering purposes. Since they are direct children of the panel in the visual tree, you'd think that the Parent property of the container would return the panel, but it doesn't! I have also confirmed this exact thing using Snoop on a standard ListBox so this isn't exclusive to our code, but apparently