0

在我的主窗口中,我使用以下代码导航到页面。

 private void logThresholds_Click_1(object sender, RoutedEventArgs e)
        {
            this.NavFrame.NavigationService.Navigate(trainSetQualityPage);
            trainSetQualityPage.MeasureQuality();
        }

该页面将在方法测量质量处理后显示(需要几秒钟),但应该避免这种情况。
进度条包含在页面 trainsetquality 中,但如上所述,它将显示在末尾。

因此,用户界面没有延迟地改变视图可以改变什么?

4

1 回答 1

0

after reading about NavigationService, i tried the Navigated event which did not the trick.

subsequent, BackgroundWorker was applied and the user interface can be used during processing of my stuff. according to msdn, DoWork and ProgressChanged events are used.

only a minor obstacle - a try catch was relevant for the ReportProgress method because it throws twice an exception.

于 2013-04-25T03:23:14.360 回答