Exemplo n.º 1
0
        private void addScrollingHandlers()
        {
            RootFrame.PointerPressed += ContentPanel_PointerPressed;
            speedMonitorTask          = new PeriodicTask(50, monitorSpeed);
            speedMonitorTask.Run();

            var page = ContentPanel.FirstVisualParent <Page>();

            page.PointerMoved    += Page_PointerMoved;
            page.PointerReleased += Page_PointerReleased;
            this.Unloaded        += (sender, args) =>
            {
                page.PointerMoved    -= Page_PointerMoved;
                page.PointerReleased -= Page_PointerReleased;
                speedMonitorTask.Cancel();
            };
        }