Your approach seems a little from here, because you basically compensate your grid to a negative location, rather than resizing it.
If you insist on this approach, I suggest the following:
Measure the height of the application window when it is in “good condition” (for example, 1280x720). Translate the grid height (48 pixels) by a percentage (48/720 = 0.0666). Now every time you want to calculate the top position, do: SlideToPosition = AppWindowHeight * 0.666.
source share