3

I'm using Jeff Wilcox's solution for a global progress indicator. All hooked up simple and is working great except for a panorama page I have. The problem is that the Progress Indicator is not visible at all and it's only on this one page.

All of my calls that go through my data service are using the same wrapper that sets IsLoading = true so I've verified this is working. I've also added a Thread.Sleep in there to make sure the call wasn't just returning too quickly before setting IsLoading = false.

Is there anything different about a panorama control that would hide it? I was setting the background to an image, but I pulled that and made sure the main layout grid background was set to transparent just in case.

Is there anything else that should be set in xaml to make sure this is visible?

*Please note this is not the old PerformanceProgressBar control

earthling
  • 5,084
  • 9
  • 46
  • 90

1 Answers1

5

Yes, there is something in the XAML, and you might kick yourself if you don't have it set (happened to me several times) check this property:

<phone:PhoneApplicationPage
 xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
 xmlns:SystemTray.IsVisible="True">

Also make sure that your progress bar actually has room to display. Progress bar takes 32 pixels off the top, so generally speaking you want your content to occupy only 768 pixels in height.

I believe that by default when you create a Panorama page using visual studio, the height is set to 800, and SystemTray.IsVisible is set to false.

Paul Hazen
  • 2,361
  • 2
  • 16
  • 21
  • Thanks. I looked 10 times for the SystemTray setting and finally found it on my 11th check and saw the IsVisible property was set to false. I guess this makes sense for a panorama page. I would love that 32 pixels back. Not sure if the system tray progress bar is worth it on this page – earthling Mar 14 '12 at 21:14
  • Yeah, using it on the panorama page kind of breaks what might have been Microsoft's vision for the design. What I did to get the best of both worlds was to edit the templates for the panorama headers, making them actually smaller, moving things around a bit positionally, until it looked good having the system tray info there. Kind of one of those gray areas I think. But if you set the background color to transparent, or the opacity to zero (I can't honestly remember which) you can get those pixels back, and the system tray will just go a layer above your page when the user swipes for it. – Paul Hazen Mar 17 '12 at 23:30
  • 3
    You may also set `SystemTray.Opacity="0"` in order to make the systray totally transparent (and then not take up 32 px of screen space). – Kenn Mar 28 '12 at 21:14
  • Im having problems showing systemtray at all on a panorama page. Cant see why. Height is set to 768 and xmlns:SystemTray.Isvisible="True". Any idea what it could be? – Hans Petter Naumann Aug 09 '12 at 12:04
  • When you say "Height is set to 768" do you mean height of the panorama page? – Paul Hazen Aug 09 '12 at 21:59
  • mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768" – Hans Petter Naumann Aug 10 '12 at 08:09
  • Okay, so the "d:" prefix signifies that the value is just a design value (as does the prefix "Design" right *after* the "d:"). At compile time, these values will be thrown out and the default values for Width and Height will be used. So try using Width=480 and Height=768, and see if that fixes it for you (on a dreaded mac now, or I'd try it for you) – Paul Hazen Aug 10 '12 at 09:10
  • Thanks, that worked pretty well. Do you know how i can hide it, and only make it visible when the user taps the top of the screen (just like on the start screen of the phone)? – Hans Petter Naumann Aug 10 '12 at 09:56
  • Yup. Check out the "Opacity" property, and play around with changing it. I recall something strange about it. But look in that general area, should get you in the right direction. Try combos like IsVisible=True and Opacity=100 or setting the PanoPage to height of 100% but explicitly setting SystemTray.IsVisible... there was some combo. If I find the time I'll build it at home, get an answer for yah. But it shouldn't take you nearly that long to come up with the answer on your own. – Paul Hazen Aug 10 '12 at 11:57
  • Ok, i'll try to figure it out :) Thanks a million! – Hans Petter Naumann Aug 10 '12 at 12:14