WPF remove grid layout child using name
Give开发者_如何学Pythonn a Grid
, I'm adding a child to it using Grid.Children.Add(element)
. How can I remove this element using its name? Something like Grid.Children.Remove("name")
UIElement child = grid1.FindName("name") as UIElement;
grid1.Children.Remove(child);
精彩评论