Example #1
0
        public Page(string id)
        {
            this.InitializeComponent ();
            this.Loaded += delegate {

                _content = new Content(this);
                _device = new GraphicsDevice(this, _content);

                HtmlPage.RegisterScriptableObject("graphicsDevice", _device);
                HtmlPage.RegisterScriptableObject("content", _content);
            };

            this.KeyDown += delegate(object sender, System.Windows.Input.KeyEventArgs e) {
                HtmlPage.Window.Invoke("JsBlitWindowSLOnKeyDown", id, e.PlatformKeyCode);
            };

            this.KeyUp += delegate(object sender, System.Windows.Input.KeyEventArgs e) {
                HtmlPage.Window.Invoke("JsBlitWindowSLOnKeyUp", id, e.PlatformKeyCode);
            };
        }
Example #2
0
 public GraphicsDevice(Page page, Content content)
 {
     _content = content;
     _page = page;
 }