Xamarin Forms: Grid button UI breaks when click restart button
问题 I am using a button inside the grid for showing letters to implement a Word search game . Initially, the UI is looking good, but when clicks the play again button the UI breaks. Screenshot: Code for the setting button inside grid: void SetGridLayout(char[,] matrixToPrint) { int numRows = matrixToPrint.GetLength(0); int numCols = matrixToPrint.GetLength(1); gridLayout.HorizontalOptions = LayoutOptions.FillAndExpand; gridLayout.SetBinding(Button.HeightRequestProperty, new Binding("Width",