I'm drawing a cell wall on a map and it is the wrong size. I checked the height of the image in debugger and it was the same size as the cellSize which is correct, but visually it appears shorter and the start of it is not drawn in the correct place. Like it is being drawn over top of at both ends. When I change the Height property of the image it does not make the image bigger. Is that not how to set the image size, with Height and Width?

![enter image description here](https://i.stack.imgur.com/oBqKB.jpg)

Here is the code. 

```
private void calculateWall(int wall, int cell)
        {
            int[] mapData = this.getMapData(cell);
            int startOfCol = mapData[0];
            int endOfCol = mapData[1];
            int startOfRow = mapData[2];
            int endOfRow = mapData[3];
            CellSide rightSide = this.getCells()[cell].myRightWall;
            CellSide bottomSide = this.getCells()[cell].myBottomWall;

            float thickness = myMap.myCellSize * (float)0.1;
            Math.Round(thickness, 0);
            int newThickness = Convert.ToInt32(thickness);

            float height = myMap.myCellSize * (float)0.2;
            Math.Round(height, 0);
            int newHeight = Convert.ToInt32(height);

            if (rightSide.hasWall == 1)
            {
                Image verticalWall = new Image();

                // Create source.
                BitmapImage bi = new BitmapImage();

                // BitmapImage.UriSource must be in a BeginInit/EndInit block.
                bi.BeginInit();
                bi.UriSource = new Uri("verticalWall.jpg", UriKind.RelativeOrAbsolute);
                bi.EndInit();

                // Set the image source.
                verticalWall.Source = bi;

                verticalWall.Width = newThickness;
                verticalWall.Height = myMap.myCellSize;
                verticalWall.SetValue(Canvas.TopProperty, Convert.ToDouble(startOfRow));
                verticalWall.SetValue(Canvas.LeftProperty, Convert.ToDouble(endOfCol - (newThickness / 2)));

                verticalWall.IsHitTestVisible = false;
                this.view.pbxMap.Children.Add(verticalWall);
            }

```