vcsharp
vcsharp

Reputation: 1

visual c# delete control during runtime

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

Answers (1)

jumpdart
jumpdart

Reputation: 1712

remove the control from the collection it belongs to Helpful link

Upvotes: 2

Related Questions