I want to know the screen resolution so that I can set the height of an element according to the resolution in a Windows 8 app.
Are you using XAML? If so it does not matter. Use the Grid control. It will fill up all available space. Read Jerry's blog as to why you might want to use xaml for WinRT development.