PageRenderTime 38ms CodeModel.GetById 19ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 0ms

/V2.2/trunk/Quickstarts/Hello World/HelloWorld.Silverlight/HelloWorld.Silverlight.Web/HelloWorld.SilverlightTestPage.html

#
HTML | 77 lines | 66 code | 8 blank | 3 comment | 0 complexity | 2bfe383ca92ae504559f55b49d4024b6 MD5 | raw file
 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml" >
 3<!-- saved from url=(0014)about:internet -->
 4<head>
 5    <title>HelloWorld.Silverlight</title>
 6
 7    <style type="text/css">
 8    html, body {
 9	    height: 100%;
10	    overflow: auto;
11    }
12    body {
13	    padding: 0;
14	    margin: 0;
15    }
16    #silverlightControlHost {
17	    height: 100%;
18    }
19    </style>
20    <script type="text/javascript" src="Silverlight.js"></script>
21    <script type="text/javascript">
22        function onSilverlightError(sender, args) {
23        
24            var appSource = "";
25            if (sender != null && sender != 0) {
26                appSource = sender.getHost().Source;
27            } 
28            var errorType = args.ErrorType;
29            var iErrorCode = args.ErrorCode;
30            
31            var errMsg = "Unhandled Error in Silverlight 2 Application " +  appSource + "\n" ;
32
33            errMsg += "Code: "+ iErrorCode + "    \n";
34            errMsg += "Category: " + errorType + "       \n";
35            errMsg += "Message: " + args.ErrorMessage + "     \n";
36
37            if (errorType == "ParserError")
38            {
39                errMsg += "File: " + args.xamlFile + "     \n";
40                errMsg += "Line: " + args.lineNumber + "     \n";
41                errMsg += "Position: " + args.charPosition + "     \n";
42            }
43            else if (errorType == "RuntimeError")
44            {           
45                if (args.lineNumber != 0)
46                {
47                    errMsg += "Line: " + args.lineNumber + "     \n";
48                    errMsg += "Position: " +  args.charPosition + "     \n";
49                }
50                errMsg += "MethodName: " + args.methodName + "     \n";
51            }
52
53            throw new Error(errMsg);
54        }
55    </script>
56</head>
57
58<body>
59    <!-- Runtime errors from Silverlight will be displayed here.
60	This will contain debugging information and should be removed or hidden when debugging is completed -->
61	<div id='errorLocation' style="font-size: small;color: Gray;"></div>
62
63    <div id="silverlightControlHost">
64		<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
65			<param name="source" value="ClientBin/HelloWorld.Silverlight.xap"/>
66			<param name="onerror" value="onSilverlightError" />
67			<param name="background" value="white" />
68			<param name="minRuntimeVersion" value="2.0.30923.0" />
69			<param name="autoUpgrade" value="true" />
70			<a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
71     			<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
72			</a>
73		</object>
74		<iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
75    </div>
76</body>
77</html>