我想知道如何在 WPF 的 UniformGrid 中显示网格线。我知道在普通网格中设置网格线很容易,但我发现 UniformGrid 无法像普通网格那样设置网格线。最好为代码和 xaml 提供简单的示例,因为我希望在编程时更加灵活。谢谢!
// LOGIN PAGE
//gameType is input by users.If gameType =3, it will form 3x3 uniform grid in GAMEPLAY PAGE
GamePlay main = new GamePlay(gameType, playerNum);
App.Current.MainWindow = main;
this.Close();
main.Show();
// GAMEPLAY PAGE
// Form the required grid, I can form the grid correctly, but I want grid line to make it more clear