Exemple #1
0
 private void disableTouch()
 {
     if (touchHandler != null)
     {
         touchHandler.Dispose();
         touchHandler = null;
     }
 }
Exemple #2
0
 internal void StopTouchHandling()
 {
     if (TouchHandler != null)
     {
         TouchHandler.Dispose();
         TouchHandler = null;
     }
 }
Exemple #3
0
        /// <inheritdoc />
        protected override void OnDisable()
        {
            if (touchHandler != null)
            {
                touchHandler.Dispose();
                touchHandler = null;
            }

            base.OnDisable();
        }
        /// <summary>
        /// Closes the dialog
        /// </summary>
        public void Close()
        {
            _isClosing = true;
            _contentDialog.Hide();
            _touchHandler.Dispose();
            Window.Current.CoreWindow.KeyDown -= CoreWindowOnKeyDown;
            SystemNavigationManager.GetForCurrentView().BackRequested -= OnBackRequested;
            DisplayInformation.GetForCurrentView().OrientationChanged -= OnOrientationChanged;
            var inputPane = InputPane.GetForCurrentView();

            inputPane.Hiding  -= InputPaneOnHidingOrShowing;
            inputPane.Showing -= InputPaneOnHidingOrShowing;
            this.GetReactContext().GetNativeModule <ExceptionsManagerModule>().BeforeShowDevOptionsDialog -= Close;
        }
        /// <summary>
        /// Frees resources associated with this root view.
        /// </summary>
        /// <remarks>
        /// Has to be called under the dispatcher associated with the view.
        /// </remarks>
        /// <returns>Awaitable task.</returns>
        public async Task StopReactApplicationAsync()
        {
            DispatcherHelpers.AssertOnDispatcher(this);

            TouchHandler.Dispose();

            var reactInstanceManager = _reactInstanceManager;
            var attachScheduled      = _attachScheduled;

            _attachScheduled = false;
            if (!attachScheduled && reactInstanceManager != null)
            {
                await reactInstanceManager.DetachRootViewAsync(this);
            }
        }