Converting Java GUI to C# WPF -


New C # and WPF try to reproduce a simple 2D chess game written in Java Swing a few years ago Has been doing. There are an 8x8 grid button, which is built into a loop:

  Jebton [] [] class = new pocket [8] [8]; Grid.setLayout (new grid layout (8, 8)); For (int i = 0; i squares.length; i ++) {for (int j = 0; j & lt; square [i]. Length; j ++) {intersection [i] ] = New pocket (); Grid.add (class [i] [ja]); Classes [i] [j] .addActionListener (this); }}  

Is it possible to use WPF in C #? Thank you very much any help

thanks, Rob

Can do this in. Take a look at the Grid and Buttons Controls Grid for each button. Rau and Grid You will need to set the column property, and you will need to create every 8 entries in the grid. Row Definition and Grid. Column define lists

Take a look, for a good start (it uses xml, but you can do it with c #).


Comments