Somehow WPF Canvas has a lot of items which are NULL.
Is there some way to delete/remove it?
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.
I am assuming your Canvas has
nullitems because it is bound to a data source that hasnullitemsIt would be far better to remove the
nullitems from the data source before binding the data, however if that isn’t possible, then try using aConverterthat removesnullitems from the collection to do the binding.All it really needs to do is loop through the items and check if each one is
null. If so, remove it using.RemoveAt(index)