How to programatically get an actual screen size (width and height) in Windows Phone? Normally I would use the following: How to get screen size on Windows Phone 7 Series
But Panorama control is a bit tricky, since the above code gives a PanoramaItem width and height (not Panorama width and height).
I have the following code that creates popup:
modalPopup = new Popup();
modalPopup.Child = new ModalWait() { MaxWidth = Application.Current.Host.Content.ActualWidth };
modalPopup.IsOpen = true;
As I result a popup is created a width of PanoramaItem, which is not a total width of a phone screen. There's a right margin which is not covered with the popup. See the screenshot below:
Any ideas how to overcome this right margin and get the actual phone screen size?