1

インターネットサービスからデータをロードするWindows8アプリケーションを作成しているので、ロード中に拡張スプラッシュを使用しています。アプリが起動すると、スプラッシュ画面が1秒間表示されてから、ExtendedSplashに移動します。スプラッシュ間の切り替え中に、画面がほんの一瞬点滅/点滅するのを見ることができます。どういうわけかこの点滅を避けることができますか?

基本的に、App.xaml.csでは:

protected override async void OnLaunched(LaunchActivatedEventArgs args)
{
        if (_rootFrame == null)
        {
            _rootFrame = new Frame();
            SuspensionManager.RegisterFrame(_rootFrame, "appFrame");
        }

        // extended splash
        _rootFrame.Navigate(typeof (ExtendedSplash), args.SplashScreen);
        Window.Current.Content = _rootFrame;
        Window.Current.Activate();

        await PerformDataFetch(); // also navigate to main page after loading complete
}

拡張スプラッシュは、スプラッシュ+ローディングリングと同じレイアウトです。

4

1 に答える 1

3

それ以外の:

_rootFrame.Navigate(typeof (ExtendedSplash), args.SplashScreen); 

あなたは試してみたいかもしれません:

//The key is not how you get the new splash screen
_rootFrame.Content = new ExtendedSplash(args.SplashScreen);

//but rather in how you GET TO the Splash Screen... 
// Navigation will trigger a complete refresh, reassigning a value should not. 
Window.Current.Content = _rootFrame;

このようにして、画面を更新するナビゲーションイベントのトリガーを回避できます。また、フレームのコンテンツはシームレスに更新される必要があります。

于 2012-10-05T20:20:39.283 に答える