Example #1
0
 private void IntelliSenseStatus_InProgressChanged(object sender, OperationProgressStatusChangedEventArgs e)
 {
     if (!e.Status.IsInProgress)
     {
         StartScanningInThreadPool();
     }
 }
Example #2
0
        /// <summary>
        /// Receives notifications when the status of the IntelliSense stage has changed and updates the UI. Note that events are received on background threads, so it needs to switch to the UI thread in order to update the UI.
        /// </summary>
        private void IntelliSenseStatus_InProgressChanged(object sender, OperationProgressStatusChangedEventArgs e)
        {
            // Operation Progress service sends notifications on background threads.
            // In order to update the UI, we need to switch to the main thread first.
            this.joinableTaskFactory.RunAsync(
                async() =>
            {
                await this.joinableTaskFactory.SwitchToMainThreadAsync();

                this.UpdateintelliSenseStatusTextBlock(e.Status);
            });
        }