悲しいことに、stackoverflow に関するこの問題についての質問は 1 つもありません。少なくとも、検索中に出くわしたものはありません。
とにかく、私が話しているプログラムが構築されるとき。表示される最初のウィンドウはログインです。ユーザーが正しいログイン情報を入力すると、メイン ウィンドウが表示されます。ただし、メイン ウィンドウには、インターネットから収集された大量の情報があります。
これにより、下の図 [1] に示すように、ある程度の時間、メイン ウィンドウが透明なままになります。インターネットから収集された情報は、いくつかの xml と MySQL データベースからのデータで構成されています。
次のような Window_Loaded イベントがあります。
private void Window_Loaded(object sender, RoutedEventArgs e)
{
method1();
method2(1);
method3();
.
.
.
//method6();
}
したがって、明らかに、特定のメソッドをキャンセルしてこのイベントを短時間で終了すると、ウィンドウは通常の状態になる前に透明なままになり、小さくなります。
ただし、私がやりたいことは、ウィンドウを正常にロードしてから、コンテンツがロードされていることをユーザーに通知するためのロード インジケーターを表示することです。
ps mahapps.metro コントロールを使用しています。
前もって感謝します