示例#1
0
        protected override void LoadContent()
        {
            sb = new SpriteBatch(GraphicsDevice);

            win = Content.Load<Window>("test");
            win.Initialise(null);
            win.LoadGraphics(GraphicsDevice, Content);

            win.NamedChildren["testBtn"].Triggered += (b) =>
                {
                    Exit();
                };

            #if WINDOWS_PHONE
            touchInput = new WP7Touch(win);
            touchInput.ClearGestures();
            touchInput.EnableTap();
            touchInput.EnableDoubleTap();
            #else
            mouseInput = new MouseInput(win);
            #endif

            base.LoadContent();
        }