locked
Progress Indicator in win 8 Metro JavaScript

    Question

  • I have a load operation that takes a couple seconds (pulling data from a web server) and I'd like to display the loading (...) type message.  I can't find the sample.  Can someone point me at it.  I remember seeing it previously.

    Also, is there a very very simple splash screen sample out there? the one that is in the sample directory has a bunch of extended flash screen stuff mixed in it that confuses me (and sadly doesn't work for me when I try and integrate it)

    thanks,


    Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider

    Tuesday, August 28, 2012 7:42 AM

Answers

All replies

  • Hi Peter,

    It is the Progress control: http://msdn.microsoft.com/en-us/library/windows/apps/hh465487.aspx

    Simplified splash screen:  Simply make the first page in your application what you want to display as your splash screen.  When you background or time consuming operation finishes, simply navigate to, or display your first app page (keep the spash screen out of your navigation stack if you are using the Navigation stack).

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, August 28, 2012 12:16 PM
    Moderator
  • when you say first page, do you mean what is set in the app manifest?  currently, it's default.html. in the default.js javascript, my app does the following:

            if (args.detail.kind === activation.ActivationKind.launch) {
                args.setPromise(WinJS.UI.processAll().then(function () {
                    // Navigate to either the first scenario or to the last running scenario
                    // before suspension or termination.
                    
    

    I assume the splash page needs to come up before the "if" above.  How do I get the  splash screen to come up first? when I put an image in my default.html, I never see it.  The only reason I'm doing this is because in my last review where I got the token, the reviewer said I "must" have a splash screen when my app starts.  Since it is just bring up the login control, there is really no delay.  Did my "expert" reviewer give me wrong advice?  is there any reason I have to have a splash screen?

    (thanks for the pointer on the progress bar, I'm working on that)


    Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider

    Wednesday, August 29, 2012 4:13 AM
  • Hi Peter,

    You may have had the default splash screen (which is an X in a box graphic).  The splash screen is defined in your manifest as an image.

    That is all that is required.  If you application takes too long to start (fails the Certification tool) you can display that same image immediately on start while your long running startup processes finish.  Once these processes finish you can display your first screen in your app.

    If your reviewer or you have questions on this feel free to contact me!

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, August 29, 2012 11:47 AM
    Moderator