private async void NavigationService_Navigating(object sender, NavigatingCancelEventArgs e)
        {
            if (e.NavigationMode == NavigationMode.Back)
            {
                IRealTimeInkService service = AppObjects.Instance.Device.GetService(InkDeviceService.RealTimeInk) as IRealTimeInkService;

                if ((service != null) && service.IsStarted)
                {
                    await service.StopAsync(m_cts.Token);
                }
            }
        }
コード例 #2
0
        private async void RealTimeInkPage_BackRequested(object sender, BackRequestedEventArgs e)
        {
            if (AppObjects.Instance.Device != null)
            {
                IRealTimeInkService service = AppObjects.Instance.Device.GetService(InkDeviceService.RealTimeInk) as IRealTimeInkService;

                if ((service != null) && service.IsStarted)
                {
                    await service.StopAsync(m_cts.Token);
                }
            }

            if (Frame.CanGoBack)
            {
                Frame.GoBack();
            }
        }