I am new in C# WPF and am trying to create a WordPuzzle game. I created a 10x10 table and randomly inserted a letter into each cell. Here is My C# code:
public partial class MainWindow : Window
{
public ObservableCollection<ObservableCollection<char>> Chars { get; set; }
public MainWindow()
{
InitializeComponent();
DataContext = this;
Random rchar = new Random();
Chars = new();
for (int x = 0; x < 10; x++)
{
Chars.Add(new());
for (int y = 0; y < 10; y ++)
{
Chars[x].Add((char)rchar.Next(65, 91));
}
}
}
}
How do I put the words in the table I can’t figure out?