14

I'm trying to remove all children (and sub-children) of a Grid in WPF (I'm really new to the whole WPF business). Is there a good way of doing it programmatically? I need to do this so that I could leave an empty canvas (Grid) at one point and draw other stuff on it.

Phonon
  • 12,549
  • 13
  • 64
  • 114

1 Answers1

29

hmmm

myGrid.Children.Clear();

?

David
  • 6,014
  • 4
  • 39
  • 55