📜  在代码中将行和列添加到网格 wpf - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:24.284000             🧑  作者: Mango

代码示例1
TheGrid.RowDefinitions.Add(new RowDefinition());
var uc = new MyUserControl();
TheGrid.Children.Add(uc);
Grid.SetRow(uc, TheGrid.RowDefinitions.Count - 1);