0

Like the title says. I have a grid into which i place several elements via the Grid.SetRow() method:

Grid.SetRow(myElement, 0);

Later on I want to remove these items but I have no idea how.

Just dropping the reference to the ui element doesnt seem to do the trick.

Any ideas?

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
Ostkontentitan
  • 6,930
  • 5
  • 53
  • 71

1 Answers1

1

You can remove it using the Children collection in the grid variable:

// get grid instance
Grid grid = GetGrid();
// Remove element
grid.Children.Remove(myElement);
chue x
  • 18,573
  • 7
  • 56
  • 70