Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Popup Take Up the Full Screen WP7

How do I make a Popup take up the full width and height of the screen? I don't want to set explicit height and width of 480x800.

like image 598
Josh Close Avatar asked Dec 16 '22 16:12

Josh Close


2 Answers

I use this function:

public static Size GetScreenSize()
{
  return Application.Current.RootVisual.RenderSize;
}

As Derek points out, you need to handle rotation, etc, yourself.

like image 173
i_am_jorf Avatar answered Dec 26 '22 17:12

i_am_jorf


Popup has quite poor performance on WP7, doesn't support rotation and is difficult to size, so to implement a full screen popup you'd be better off using a Grid, which by default will fill the page if you put it at the root of the Page.

like image 30
Derek Lakin Avatar answered Dec 26 '22 17:12

Derek Lakin