WPF removes child grid elements using name

Given Grid, I add a child to it with Grid.Children.Add(element). How to remove this item using its name? Sort ofGrid.Children.Remove("name")

+3
source share
1 answer
UIElement child = grid1.FindName("name") as UIElement;
grid1.Children.Remove(child);
+3
source

Source: https://habr.com/ru/post/1790649/


All Articles