Answered XBAP loading UI

  • Monday, March 26, 2007 10:06 PM
     
     

    we've got an XBAP hosted in an IFrame.

     

    our customers are complaining about the white background when its loading.

     

    i've tried setting allowTransparency="true" on the IFrame and setting the background on the <body> as well as the <iFrame> ... but it still renders white.

     

    is there anyway to get a background color / image to render while the XBAP is loading?

     

    Thanks, casey

Answers

All Replies

  • Monday, March 26, 2007 11:21 PM
    Moderator
     
     Answered
  • Thursday, March 29, 2007 11:47 PM
     
     

    There is no way to change the background color from white, but you can keep the iframe hidden until the XBAP is fully loaded:

    Code Snippet
    <!-- saved from url=(0014)about:internet -->
    <html>
    <body>
    <div>
    <p>XBAP in iframe:</p>
    <div id="splash" style="width:600; height:400; background: yellow">Loading XBAP...</div>
    <iframe id="f1" width="600" height="400" style="visibility: hidden"
        onreadystatechange="if(readyState=='complete') { splash.removeNode(true); style.visibility='visible' }"
        src="http://url.xbap" />
    </div>
    </body>
    </html>

     

    (I'm sure you can use more DHTML finnesse than me...)

  • Friday, March 30, 2007 6:10 PM
     
     

    we tried that. it mostly worked, but wasn't 100%. on some machines, it would trigger the XBAP as loaded, but we would still get the white screen for some time.

     

    Thanks, casey
  • Friday, March 30, 2007 6:47 PM
     
     

    Yeah, I realize you may still see the download progress page on first run of the XBAP. But if you also see white on subsequent runs, make sure you've changed the root NavigationWindow's background color, for example in Application.OnStartup():

          MainWindow.Background = new SolidColorBrush(Colors.Azure);