// Create a new grid view, add content,
GridView gridView1 = new GridView();
gridView1.Items.Add("Item 1");
gridView1.Items.Add("Item 2");
// Add the grid view to a parent container in the visual tree.
stackPanel1.Children.Add(gridView1);
如何在 gridView1 中创建一个新组并向其中添加项目?