2009-10-05 Chris Toshok <toshok@ximian.com>
[moon.git] / test / xamlize.aspx
blob9deb1ff2914a2d35ad9c433a9691e0935c345a1a
1 <%@ page language="C#" %>
2 <html>
3         <head>
4                 <script type="text/javascript" src="Silverlight.js"></script>
5                 <script lang="text/javascript">
6 function createSilverlight()
8         Silverlight.createObjectEx({
9                 source: "<%= Request ["xaml"] %>",
10                 parentElement: document.getElementById("SilverlightControlHost"),
11                 id: "SilverlightControl",
12                 properties: {
13                         width: "100%",
14                         height: "100%",
15                         version: "1.1",
16                         enableHtmlAccess: "true"
17                 },
18                 events: {}
19         });
20            
21         // Give the keyboard focus to the Silverlight control by default
22     document.body.onload = function() {
23       var silverlightControl = document.getElementById('SilverlightControl');
24       if (silverlightControl)
25       silverlightControl.focus();
26     }
29                 </script>
30                 <style type="text/css">
31 .silverlightHost { }
32                 </style>
33         </head>
34     
35         <body bgcolor="gray">
37                 <div id="SilverlightControlHost" class="silverlightHost" >
38                         <script type="text/javascript">
39                                 createSilverlight();
40                         </script>
41                 </div>
42         </body>
43 </html>