public void Init() { var thisList = _gameBoard.GetSquares(); _thisGrid.Children.Clear(); GamePackageViewModelBinder.ManuelElements.Clear(); foreach (var thisSquare in thisList) { MineSquareWPF thisGraphics = new MineSquareWPF(thisSquare); _mines.Add(thisGraphics); GamePackageViewModelBinder.ManuelElements.Add(thisGraphics); GridHelper.AddControlToGrid(_thisGrid, thisGraphics, thisSquare.Row - 1, thisSquare.Column - 1); } //probably after all is done recheck the bindings. }
public void Init() { var thisList = _gameBoard.GetSquares(); _thisGrid.Children.Clear(); GamePackageViewModelBinder.ManuelElements.Clear(); //most likely has to do manually here too foreach (var thisSquare in thisList) { MineSquareXF thisGraphics = new MineSquareXF(thisSquare); thisGraphics.HorizontalOptions = LayoutOptions.Fill; thisGraphics.VerticalOptions = LayoutOptions.Fill; _mines.Add(thisGraphics); GamePackageViewModelBinder.ManuelElements.Add(thisGraphics); GridHelper.AddControlToGrid(_thisGrid, thisGraphics, thisSquare.Row - 1, thisSquare.Column - 1); } //probably after all is done recheck the bindings. }