ListView.ItemContainerGenerator.ContainerFromItem(item) return null after 20 items

后端 未结 1 835
醉酒成梦
醉酒成梦 2021-01-26 16:08

first of all I want to explain what I\'m trying to do. I have a ListView in a UserControl with a DataTemplate defined as a resource. I wan

1条回答
  •  伪装坚强ぢ
    2021-01-26 16:27

    The ListView is using virtualization, therefore it will not have created any containers for items that it knows it doesn't have to display. This is a "good thing", especially considering you have 1576 items.

    Perhaps you can explain why you want to be able to get the container for the item that is not visible and we can provide better suggestions as far as what you can do.

    0 讨论(0)
提交回复
热议问题