小编Nic*_*oli的帖子

删除Grid的指定Children元素

我需要在运行时删除Grid(grid1)的指定元素.这是我添加元素的代码.

 examControls.Add(excontrol);  // add the element on the ArrayList
 excontrol.Margin = new Thickness(x, y + margin, 0, 0);
 grid1.Children.Add(excontrol);   
Run Code Online (Sandbox Code Playgroud)

如何在运行时删除指定的"excontrol"元素(在运行时添加)?

提前致谢

c# wpf grid children

4
推荐指数
2
解决办法
2万
查看次数

标签 统计

c# ×1

children ×1

grid ×1

wpf ×1