...">

Remove all children from the StackPanel

I have the following xaml code:

//some code <ListBox> <StackPanel Name="Mess"> </StackPanel> </ListBox> 

Then I add the elements to the StackPanel .

But for now, I need to remove all Mess child elements. How can i do this?

+8
c # windows-phone
source share
1 answer

Try

 Mess.Children.Clear(); 
+26
source share

All Articles