views:

115

answers:

1

Hello Guys..

I have this problem that I have a little menu with a croll bar.. inside there's a couple of items with checkboxes.. On iterating through these checkboxes I get a null error.It seems like this is caused whenever a checkbox is not part of the visible space of the menu thingy.. Like Silverlight only initiate the checkbox when you scroll down so it is visible..

Anyone have any idee how to get around this?

+1  A: 

When iterating thru the checkboxes, try adding a check to see if you're actualy dealing with a checkbox and not something else that's in the elementtree.

Loop thru children
  if(child is CheckBox){ 
  // Do what you want with the checkbox
  }
Sorskoot