WPF/C# でアニメーション GIF を表示するには、Microsoft MSDN の次のコード サンプルを使用します: Show GIF animation in WPF。
これをモードレス ウィンドウ ( window.Show()) で使用すると、画像がアニメーションしません。なんで?
(モーダルウィンドウ)ではwindow.ShowDialog()正しく動作します。
WPF Project Befor Start MainWindow で、モードレスで最初のタスクを実行してから閉じるためのウィンドウを表示します (これらは app.xaml.cs Startup イベントにあります)。
// app.xaml.cs 
public partial class App : Application
{
    private void Application_Startup(object sender, StartupEventArgs e)
    {
        FirstTask firstTask = new FirstTask();
        firstTask.Show();
        // do task
        System.Threading.Thread.Sleep(5000);
        firstTask.Close();
        MainWindow mainWindow = new MainWindow();
        mainWindow.ShowDialog();
    }
}
AnimatedGIFControl クラスの AnimatedGIFControl_Loaded 関数のコードの最後に、アニメーション gif を自動的に開始するコードを追加します。
ImageAnimator.Animate(_bitmap, OnFrameChanged);
完全な AnimatedGIFControl_Loaded コード
     void AnimatedGIFControl_Loaded(object sender, RoutedEventArgs e)
    {
        // Get GIF image from Resources
        if (gifanimate.Properties.Resources.ProgressIndicator != null)
        {
            _bitmap = gifanimate.Properties.Resources.ProgressIndicator;
            Width = _bitmap.Width;
            Height = _bitmap.Height;
            _bitmapSource = GetBitmapSource();
            Source = _bitmapSource;
            ImageAnimator.Animate(_bitmap, OnFrameChanged);
        }             
    }
ImageAnimator.Animate(_bitmap, OnFrameChanged);
また、アニメーションgifを表示するためにfirstTaskウィンドウとMainWindowに追加します。
別の問題: firstTask.Close(); の後。アプリケーションは MainWindow を表示しません。なぜ知っていましたか?