Jaa


Do you subclass ItemsControl? Keep reading.

ItemsControl has a protected virtual GetContainerForItemOverride that takes an object parameter.

In all in-box WPF controls, this parameter is ignored and a cookie-cutter container is returned.

While it’s currently possible for control authors to change the container they return depending on the object provided, we’ve never seen this done.

We have an opportunity to optimize the behavior of ItemsControl under a few circumstances, but only if we can assume the container returned from GetContainerForItemOverride is constant for any ItemsControl.

The WPF team is entertaining changing this method to have no parameters to allow for this optimization. Before we make such a change, though, we want to make sure there are no real-world applications of this parameter that we’d be eliminating (especially this late in our product cycle.)

If you could please let us know if you are using this parameter, how you’re using it, and the inconvenience caused by its removal, we would greatly appreciate it.

Please provide feedback by replying to this post or sending me a note.

Thanks.