开发者

WPF remove grid layout child using name

开发者 https://www.devze.com 2023-02-09 19:01 出处:网络
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

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消