Home Dashboard Directory Help

Silverlight Forum: application is not loaded completely sometimes when using splash screen and enable applicaion library caching by CSSForumEngineer


 as Fixed Help for as Fixed

Sign in
to vote
Type: Bug
ID: 689418
Opened: 9/19/2011 12:23:30 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
User(s) can reproduce this bug


Sometimes (rough estimate 1 out of 3 times), the application does not load completely and shows a blank/white screen. If look in the output window, all assemblies are loaded but not the assemblies which are stored in an external ZIP file (I chose the option 'application library caching').

If don't use the splash screen, the app loads completely.

If don't use the option 'application library caching', all the assemblies (including the ones which where previously in an external ZIP files) are loaded correctly.
Sign in to post a comment.
Posted by Microsoft on 4/29/2014 at 12:23 PM
Thank you for reporting this issue. This issue has been fixed in Visual Studio 2013. You can install a trial version of Visual Studio 2013 with the fix from: http://go.microsoft.com/?linkid=9832436
Posted by Martin van de Goor on 1/8/2014 at 5:08 AM
How embedding the XAML in HTML as Microsoft suggests as a workaround is described here: http://msdn.microsoft.com/en-us/library/cc189016%28v=vs.95%29.aspx
Posted by Ievgen Tiutiunnyk on 6/7/2012 at 12:04 PM
I think the idea of manual loading of SplashScreen can be solved by using CreateFromXamlDownloader in JavaScript as described here http://msdn.microsoft.com/en-us/subscriptions/bb979735(v=vs.96).aspx
Posted by Ievgen Tiutiunnyk on 6/7/2012 at 11:29 AM
Guys, we got this problem (ALC + custom SplashScreen) on our project and we fixed it by avoiding using custom splash screen but we still want to have it. So I am wondering how to implement this workaround that mentioned before:

"you should be able to embed the xaml for the splash screen in the html page and use the id of the script element with the xaml as the control's splash screen source"

I haven't found any information on the Internet how to make this setup in HTML. Any ideas?
Posted by Hammer74 on 4/16/2012 at 6:01 PM
We have recently struck this same issue when turning on ALC.

Can you give an example of the suggested workaround of embedding the xaml for the splash screen in the html page? I can't seem to get this to work either.
Posted by ledz on 1/10/2012 at 2:03 AM
Just another comment. This happens only with IE (tested with version 9).
Posted by ledz on 1/10/2012 at 1:45 AM
I have this problem with a large application in SL4. Sometimes the applications just doesn't load and shows a blank screen. The custom splash screen even shows correctly until the 100% but then application just hangs with a blank screen. This happens roughly 1 out of 4 times. A resolution for this would be nice, as the other workaround for reducing a xap file size is too troublesome, and this bug just makes this feature completely unusable.
Posted by Microsoft on 10/12/2011 at 12:22 PM
This looks like a timing issue related to the download for the splash screen taking longer than the xap download. As a workaround, you should be able to embed the xaml for the splash screen in the html page and use the id of the script element with the xaml as the control's splash screen source.
Posted by Microsoft on 9/19/2011 at 3:26 PM
we need a repro app in order to isolate this, thanks.
Posted by MS-Moderator10 [Feedback Moderator] on 9/19/2011 at 2:40 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by MS-Moderator01 on 9/19/2011 at 12:42 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by Trevor Fellman on 7/1/2013 at 6:11 PM
Don't use a XAML Splash Screen. Instead hide the SL control until download is complete, and show download progress using HTML/JS. (i.e. implement the Splash Screen in HTML/JS rather than XAML)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

    <style type="text/css">
html, body {
        height: 100%;
        overflow: auto;
    body {
        padding: 0;
        margin: 0;
    #silverlightControlHost {
        height: 100%;

    #splashscreen {
        height: 100%;
     border:1px solid black;
    <script type="text/javascript" src="Silverlight.js"></script>
    <script type="text/javascript">
        function onSilverlightError(sender, args) {
            var appSource = "";
            if (sender != null && sender != 0) {
             appSource = sender.getHost().Source;
            var errorType = args.ErrorType;
            var iErrorCode = args.ErrorCode;

            if (errorType == "ImageError" || errorType == "MediaError") {

            var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ;

            errMsg += "Code: "+ iErrorCode + "    \n";
            errMsg += "Category: " + errorType + "     \n";
            errMsg += "Message: " + args.ErrorMessage + "     \n";

            if (errorType == "ParserError") {
                errMsg += "File: " + args.xamlFile + "     \n";
                errMsg += "Line: " + args.lineNumber + "     \n";
                errMsg += "Position: " + args.charPosition + "     \n";
            else if (errorType == "RuntimeError") {        
                if (args.lineNumber != 0) {
                    errMsg += "Line: " + args.lineNumber + "     \n";
                    errMsg += "Position: " + args.charPosition + "     \n";
                errMsg += "MethodName: " + args.methodName + "     \n";

            throw new Error(errMsg);


        function LoadSLContent() {
            var currentTime = new Date();
            var xapSource = "ClientBin/SL5HTMLSplash.xap?" + currentTime.getMinutes() + currentTime.getSeconds();
            xapSource, // source
            silverlightControlHost, // parent element
            "slPlugin", // id for generated object element
                width: "100%", height: "0%", background: "white",
                version: "4.0.60310.0", enableHtmlAccess: 'bool'
            // See the event handlers in the full example.
            { onError: onSilverlightError, onLoad: onSLLoad, onSourceDownloadProgressChanged: onSLSourceDownloadProgressChanged },
            "", //init params
            "context"    // context helper for onLoad handler.

        function onSLLoad(sender) {

            var slPlugin = document.getElementById("slPlugin");
            slPlugin.height = "100%";

            var pwidget = document.getElementById("splashscreen");
            pwidget.style.visibility = "hidden";
            pwidget.style.height = "0px";


        function onSLSourceDownloadProgressChanged(sender, eventArgs) {
            var indicator = document.getElementById("progress");
            var number = document.getElementById("number");

            var progressvalue = 0;
            if (eventArgs.progress)
                progressvalue = eventArgs.progress
            else progressvalue = eventArgs.get_progress();

            indicator.style.width = (progressvalue * 400) + "px";
            progressvalue *= 100;
            number.innerHTML = progressvalue.toFixed(0);


<body onload="LoadSLContent()">
    <form id="form1" runat="server" style="height:100%" >

        <div id="silverlightControlHost">
            <iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
        <div id="splashscreen">
            <div id="message">
                    This Progress\SplashScreen is 100% HTML/JS
                Downlading XAP...
                <div id="progressbar">    
                    <div id="progress">
                        <div id="number">0</div>
Posted by Ievgen Tiutiunnyk on 6/7/2012 at 11:30 AM
Stop using custom made SplashScreen.xaml.
File Name Submitted By Submitted On File Size  
SL5HTMLSplash.zip 7/1/2013 27 KB