0

I'm creating a game (minesweeper) for my Windows Phone. There is a grid and this app automatically creates buttons (cells) by a double for loop (i for columns and j for rows). The position of a button is (CellWidth * i, CellHeigth * j, 0, 0).

The problem is the space between the buttons, and I don't know why it exist! By code there isn't any space between the buttons.

screenshot

Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254

1 Answers1

3

Create a style for the button and set the margin/padding to 0. I believe the default style has margins and/or padding.

Take a look at Why does System.Windows.Controls.Button always have a padding of 10px? and How to remove the black space around the button in WP7?

Community
  • 1
  • 1
trydis
  • 3,905
  • 1
  • 26
  • 31