How do I programatically get the screen resolution on WP7? Here are a bunch of links that get the same job done in desktop WPF and Silverlight, but none of them are in the Phone SDK.
Any ideas?
http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/thread/f0639904-a368-44db-9ddd-efcaf8fc736e
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/6b6b832f-0dfd-428c-84cd-b1b9e7f236cf
How can I get the active screen dimensions?
http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/thread/f0639904-a368-44db-9ddd-efcaf8fc736e
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}"