How to remove ListView's add item animation?

后端 未结 7 2226
攒了一身酷
攒了一身酷 2021-02-14 06:26

I have a ListView and I edited its ItemContainerStyle to modify some style but I don\'t know how to remove that annoying animation when you add an item

7条回答
  •  礼貌的吻别
    2021-02-14 06:48

    This will work --

    listView.ItemContainerTransitions = null;
    

    You have to assign a new reference (or null) to the ItemContainerTransitions property. Changing the values in the collection already referenced by this property will not work.

    This will NOT work --

    listView.ItemContainerTransitions.Clear();
    

提交回复
热议问题