Example #1
0
        public static void Stop(BaseUserPage pageWithPointerEventsToUnRegister)
        {
            if (pageWithPointerEventsToUnRegister == null)
            {
                return;
            }

            if (_gr != null)
            {
                _gr.CrossSliding                -= gr_CrossSliding;
                _gr.Dragging                    -= gr_Dragging;
                _gr.Holding                     -= gr_Holding;
                _gr.ManipulationCompleted       -= gr_ManipulationCompleted;
                _gr.ManipulationInertiaStarting -= gr_ManipulationInertiaStarting;
                _gr.ManipulationStarted         -= gr_ManipulationStarted;
                _gr.ManipulationUpdated         -= gr_ManipulationUpdated;
                _gr.RightTapped                 -= gr_RightTapped;
                _gr.Tapped -= gr_Tapped;

                pageWithPointerEventsToUnRegister.PointerPressed  -= page_PointerPressed;
                pageWithPointerEventsToUnRegister.PointerMoved    -= page_PointerMoved;
                pageWithPointerEventsToUnRegister.PointerReleased -= page_PointerReleased;

                _gr = null;
            }
        }
Example #2
0
        public static void Start(BaseUserPage pageWithPointerEventsToRegister)
        {
            if (pageWithPointerEventsToRegister == null) return;

            pageWithPointerEventsToRegister.PointerPressed += page_PointerPressed;
            pageWithPointerEventsToRegister.PointerMoved += page_PointerMoved;
            pageWithPointerEventsToRegister.PointerReleased += page_PointerReleased;


            _gr = new Windows.UI.Input.GestureRecognizer();
            _gr.CrossSliding += gr_CrossSliding;
            _gr.Dragging += gr_Dragging;
            _gr.Holding += gr_Holding;
            _gr.ManipulationCompleted += gr_ManipulationCompleted;
            _gr.ManipulationInertiaStarting += gr_ManipulationInertiaStarting;
            _gr.ManipulationStarted += gr_ManipulationStarted;
            _gr.ManipulationUpdated += gr_ManipulationUpdated;
            _gr.RightTapped += gr_RightTapped;
            _gr.Tapped += gr_Tapped;
            _gr.GestureSettings = 
                Windows.UI.Input.GestureSettings.ManipulationRotate 
                | Windows.UI.Input.GestureSettings.ManipulationTranslateX 
                | Windows.UI.Input.GestureSettings.ManipulationTranslateY 
                | Windows.UI.Input.GestureSettings.ManipulationScale 
                | Windows.UI.Input.GestureSettings.ManipulationRotateInertia 
                | Windows.UI.Input.GestureSettings.ManipulationScaleInertia 
                | Windows.UI.Input.GestureSettings.ManipulationTranslateInertia 
                | Windows.UI.Input.GestureSettings.Tap
                | Windows.UI.Input.GestureSettings.CrossSlide
                ;


        }
Example #3
0
        public static void Start(BaseUserPage pageWithPointerEventsToRegister)
        {
            if (pageWithPointerEventsToRegister == null)
            {
                return;
            }

            pageWithPointerEventsToRegister.PointerPressed  += page_PointerPressed;
            pageWithPointerEventsToRegister.PointerMoved    += page_PointerMoved;
            pageWithPointerEventsToRegister.PointerReleased += page_PointerReleased;


            _gr = new Windows.UI.Input.GestureRecognizer();
            _gr.CrossSliding                += gr_CrossSliding;
            _gr.Dragging                    += gr_Dragging;
            _gr.Holding                     += gr_Holding;
            _gr.ManipulationCompleted       += gr_ManipulationCompleted;
            _gr.ManipulationInertiaStarting += gr_ManipulationInertiaStarting;
            _gr.ManipulationStarted         += gr_ManipulationStarted;
            _gr.ManipulationUpdated         += gr_ManipulationUpdated;
            _gr.RightTapped                 += gr_RightTapped;
            _gr.Tapped         += gr_Tapped;
            _gr.GestureSettings =
                Windows.UI.Input.GestureSettings.ManipulationRotate
                | Windows.UI.Input.GestureSettings.ManipulationTranslateX
                | Windows.UI.Input.GestureSettings.ManipulationTranslateY
                | Windows.UI.Input.GestureSettings.ManipulationScale
                | Windows.UI.Input.GestureSettings.ManipulationRotateInertia
                | Windows.UI.Input.GestureSettings.ManipulationScaleInertia
                | Windows.UI.Input.GestureSettings.ManipulationTranslateInertia
                | Windows.UI.Input.GestureSettings.Tap
                | Windows.UI.Input.GestureSettings.CrossSlide
            ;
        }
Example #4
0
        public static void Stop(BaseUserPage pageWithPointerEventsToUnRegister)
        {
            if (pageWithPointerEventsToUnRegister == null) return;

            if (_gr != null)
            {
                _gr.CrossSliding -= gr_CrossSliding;
                _gr.Dragging -= gr_Dragging;
                _gr.Holding -= gr_Holding;
                _gr.ManipulationCompleted -= gr_ManipulationCompleted;
                _gr.ManipulationInertiaStarting -= gr_ManipulationInertiaStarting;
                _gr.ManipulationStarted -= gr_ManipulationStarted;
                _gr.ManipulationUpdated -= gr_ManipulationUpdated;
                _gr.RightTapped -= gr_RightTapped;
                _gr.Tapped -= gr_Tapped;

                pageWithPointerEventsToUnRegister.PointerPressed -= page_PointerPressed;
                pageWithPointerEventsToUnRegister.PointerMoved -= page_PointerMoved;
                pageWithPointerEventsToUnRegister.PointerReleased -= page_PointerReleased;

                _gr = null;
            }
        }