Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
winrt のアプリケーションでは、最初に TextBlock のステータスの更新を開始し、次に長い計算プロセスを開始します。メイン フォームには再描画する時間がなく、ステータスの表示も変化しません。どうすれば自動的に再描画できますか?
問題は、(UI スレッドで実行時間の長い操作を実行しているため) おそらく UI スレッドをブロックしているため、UI が更新されないことです。 そのためには、次のようなことができます。
public async Task<Result> ExecuteLongOperationAsync() { return await Task.Run(() => ExecuteLongOperation()); }