WPF ListView - Event when the control is ready for iterating over rendered items?

In short, there isn't such an event. You may be able to use the LayoutUpdated event, but that is fired more than once as the ListView is updated.

In short, there isn't such an event. You may be able to use the LayoutUpdated event, but that is fired more than once as the ListView is updated. Keep in mind also, that if virtualization is enabled, then not all the containers will be created at once.

Your best bet would be to use an attached behavior (see here and here) for the ListViewItem, which you can apply using an implicit Style. For example, if you created a class called MyBehavior with a boolean attached property named MyProperty with a default value of false, then the Style would be something like: When your property is set to true, you know the ListViewItem has been created and should be ready to render. If not, you can attach to the Loaded event to know when to do your work.

Nice trick with the attached behavior but it won't help me, since it would fire per-listitem, besides, I think I can already achieve that with datatemplate.control. Loaded event. I need the event when all of the items are loaded and layed out, since my animation effects depend on the number of items and their order.

I could track each item's loaded and decrease some counter until it reaches zero, but that would be last resort. – Boris B. Jun 29 at 13:54.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions