How can I get a screen resolution of Device (Windows Phone)

revolutionkpi picture revolutionkpi · Mar 24, 2012 · Viewed 17.6k times · Source

How can I get a screen resolution of Device from settings (Windows Phone) ?

Answer

Dmitry Reznik picture Dmitry Reznik · Mar 24, 2012
public void GetScreenResolution()  
{  
     string ScreenWidth = Application.Current.Host.Content.ActualWidth.ToString();  
     string ScreenHeight = Application.Current.Host.Content.ActualHeight.ToString();  
     MessageBox.Show(ScreenWidth + "*" + ScreenHeight);  
}