アクション (アプリケーション バー ボタンを有効にする) を実行する前に、アプリケーションを一時停止する必要がありますが、これを実現する最善の方法がわかりません。基本的に別のスレッドで多くの処理が行われていますが、その後 UI が更新されます。UI が更新されたら、ピボット コントロールを特定のピボット アイテムまでスクロールします。アプリケーション バー ボタンを有効にする前に、約 1 秒間一時停止するか、ピボット コントロールの前のピボット項目にスクロールするのに時間がかかります。どうすればこれを達成できますか? 私がこれまでに持っているものは次のとおりです
// Show image and scroll to start page if needed
if (Viewport != null)
{
Viewport.Source = result;
if (editPagePivotControl != null && editPagePivotControl.SelectedIndex != 0)
{
//Here is where the pivot control is told to move to the first item
// (from the second which it will be on before this happens)
editPagePivotControl.SelectedIndex = 0;
}
//A flag to determine whether the app bar button should be enabled
//How to pause for the time it takes to finish moving
// to the first pivot item?
if (_wasEdited)
((ApplicationBarIconButton)ApplicationBar.Buttons[0]).IsEnabled = true;
}