1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4:
5: <head>
6: <title>Hello World</title>
7:
8: <!-- Import the ObjectEmbed JavaScript file -->
9: <script type="text/javascript" src="aghost.js"></script>
10: </head>
11: <body>
12:
13: <!-- Where the WPF/E ActiveX control will go -->
14: <div id="agControl1Host">
15: </div>
16:
17:
18: <script type="text/javascript">
19: // Create the WPF/E ActiveX control.
20: // Doing it this way avoids the user having to click on the
21: // ActiveX control before WPF/E will receive input.
22: new agHost("agControl1Host", 23: // hostElementID (HTML element to put WPF/E
24: // ActiveX control inside of -- usually a <div>)
25: "agControl1",
26: // ID of the WPF/E ActiveX control we create
27: "420px",
28: // Width
29: "20px",
30: // Height
31: "#CCCCCC",
32: // Background color
33: null,
34: // SourceElement (name of script tag containing xaml)
35: "HelloWorld.xaml",
36: // Source file
37: "false",
38: // IsWindowless
39: "24",
40: // MaxFrameRate
41: null);
42: // OnError handler (method name -- no quotes)
43:
44: // for convenience, create a global variable for the WPF/E ActiveX control,
45: // which we can use to find Name'd xaml elements
46: var agControl = document.getElementById("agControl1"); 47: </script>
48:
49: </body>
50: </html>