2

I want to create a little "game" in c#. For the game I need a field, where you can move. Now I want to create a 2d array (or 2d list) and display it with wpf, but I dont know how. I want to set the field size in C# and generate the gamefield random in C#.

Can someone of you give me a hint, how I can display a 2d array (or 2 list) in wpf and fill the cells with different colors?

It would be nice if you can show me a little code snipped (for understanding maybe).

Here is a little pic:

pic

I searched a lot, but didn't find something usefull.

Name
  • 21
  • 1
  • https://msdn.microsoft.com/en-us/library/vstudio/ms747393%28v=vs.100%29.aspx http://stackoverflow.com/questions/6059894/how-draw-rectangle-in-wpf https://www.google.com/ – M.kazem Akhgary Oct 08 '15 at 09:34
  • 2
    look at that http://stackoverflow.com/questions/276808/how-to-populate-a-wpf-grid-based-on-a-2-dimensional-array – Abdul Rehman Oct 08 '15 at 09:36

0 Answers0