.net Framework listview itemchecked event called each time item added

I have a lot of problems with some code, because the ListView.ItemChecked event is ListView.ItemChecked every time an item is added to the list. The only way I can stop this is to check if the list is displayed in Focused when this happens. But it seems sloppy to me. Is there any other way to fix this?

thanks

+4
source share
1 answer

Is there any other way to fix this?

One option is to remove the handles clause and use the Add / RemoveHandler statements to control when the handler processes events.

0
source

Source: https://habr.com/ru/post/1487223/


All Articles