PageRenderTime 46ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/V4/Quickstarts/Hello World/HelloWorld.Silverlight/HelloWorld.Silverlight.Web/Default.htm

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