New to C# and WPF trying to reproduce a simple 2D chess game written in Java Swing a few years ago. Consists of an 8x8 grid of buttons, produced in a loop similar to:
JButton[][] squares = new JButton[8][8];
grid.setLayout(new GridLayout(8,8));
for (int i = 0; i < squares.length; i++){
for (int j = 0; j < squares[i].length; j++){
squares[i][j] = new JButton();
grid.add(squares[i][j]);
squares[i][j].addActionListener(this);
}
}
Is it possible to do similar in C# using WPF? Any help much appreciated
Thanks, Rob