Is there an event handler that will be called when an item is added in a listbox in WPF?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The problem is that the
INotifyCollectionChangedinterface which contains the event handler is explicitly implemented, which means you have to first cast the ItemCollection before the event handler can be used:Ref.
Josh’s advice about the observable collection should also be considered.