public AdnGestureManager(
            UIElement window, 
            AdnRenderer renderer)
        {
            _window = window;

            _renderer = renderer;

            _pointerMode = PointerMode.kIdleMode;

            _accumulator = new ValueAccumulator(
                -30.0 * 1000.0 / 5.0,
                -100.0 * 1000.0 / 5.0,
                -5.0 * 1000.0 / 5.0);

            _pointers = new Dictionary<uint, PointerPoint>();

            window.PointerMoved += OnPointerMoved;
            window.PointerPressed += OnPointerPressed;
            window.PointerReleased += OnPointerReleased;
            window.PointerWheelChanged += OnPointerWheelChanged;

            _gr = new GestureRecognizer();

            _gr.GestureSettings =
              GestureSettings.Tap |
              GestureSettings.Drag |
              GestureSettings.DoubleTap |
              GestureSettings.ManipulationScale;

            _gr.Tapped += OnTapped;
            _gr.ManipulationStarted += OnManipulationStarted;
            _gr.ManipulationUpdated += OnManipulationUpdated;
            _gr.ManipulationCompleted += OnManipulationCompleted;
        }
        public ViewerPage()
        {
            InitializeComponent();

            KeyDown += (s, e) =>
            {
                if (e.Key == Windows.System.VirtualKey.Escape)
                    OnQuit();
            };

            _renderer = new AdnRenderer();

            _renderer.OnMetaDataDisplayEvent += 
                OnMetaDataDisplayEvent;           

            _gestureManager =
                new AdnGestureManager(
                    this,
                    _renderer);

            _renderer.Run(this.DXSwapChainPanel);
        }