Polygon p = new Polygon();
p.Name = "abcde";
PointCollection pc = new PointCollection();
pc.Add(new Point(0, 16));
p.Points = pc;
canvasd.Children.Add(p);
================================
请问建立后如何移除abcde?
foreach(Polygon p in canvasd.Children)
{
if(p.Name == "abcde")
{
canvasd.Children.Remove(p);
}
}
Name是属性吗?移除是啥意思...
如同上面问的,说明白点
同上!