How to get screen size on Windows Phone 7 Series?

Igor Zevaka picture Igor Zevaka · Apr 8, 2010 · Viewed 19.1k times · Source

Answer

Luke Puplett picture Luke Puplett · Dec 8, 2010

I use this:

this.ScreenWidth = System.Windows.Application.Current.Host.Content.ActualWidth;
this.ScreenHeight = System.Windows.Application.Current.Host.Content.ActualHeight;

Many ways to skin an app. If its for XAML, you could bind to the properties of the LayoutRoot.

Height="{Binding ElementName=LayoutRoot,Path=ActualHeight}"