How to get the resolution of screen? For a WinRT app?

c#, windows-8, windows-runtime, xaml

Solution

How about this?

var bounds = Window.Current.Bounds;

double height = bounds.Height;

double width = bounds.Width;

Problem

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.

Original source