ArrayList list = new ArrayList();for (int k = 0; k < 6; k++){for (int p = 0; p < 11; p++){Label labs = new Label();labs.HorizontalAlignment = HorizontalAlignment.Left;labs.VerticalAlignment = VerticalAlignment.Top;labs.Margin = new Thickness(599 + (17 * p), 206 + (17 * k), 0, 0);labs.Name = "lab" + k + p;labs.Width = 16;labs.Height = 16;list.Add(labs);main.Children.Add(labs);}}我动态添加一些Label,并放入ArrayList中,后面我要遍历ArrayList,获取每个Label的值,对每个Label进行操作,要怎么写?
- 2 回答
- 0 关注
- 924 浏览
添加回答
举报
0/150
提交
取消