Ejemplo n.º 1
0
        private void ResizeBoard(double width, double height)
        {
            var screenRatio  = width / height;
            var boardSize    = screenRatio >= 1.75d ? height : (width * (1d / 1.75d));
            var trackerWidth = boardSize * 0.75d;

            ChessBoard.HorizontalOptions = LayoutOptions.End;
            ChessBoard.VerticalOptions   = LayoutOptions.Center;
            ChessBoard.WidthRequest      = boardSize;
            ChessBoard.HeightRequest     = boardSize;
            ChessBoard.ForceLayout();

            GameTracker.HorizontalOptions = LayoutOptions.Start;
            GameTracker.VerticalOptions   = LayoutOptions.Center;
            GameTracker.WidthRequest      = trackerWidth;
            GameTracker.HeightRequest     = boardSize;
            GameTracker.ForceLayout();

            ForceLayout();
        }