Reputation: 1
I have a programatically created ListBoxItem which contains a stack panels containing a checkbox. I have an event handler attached to the checkbox and when the user checks the checkbox I want the ListBoxItem and all its children to be deleted. How should I do this?
Upvotes: 0
Views: 884
Reputation: 1712
remove the control from the collection it belongs to Helpful link
Upvotes: 2