【发布时间】:2023-03-22 15:29:02
【问题描述】:
我正在编写 Windows 8 应用程序,它从 Internet 服务加载数据,所以我在加载过程中使用了扩展启动。 当应用程序启动时,它会显示启动画面一秒钟,然后导航到 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
}
扩展的飞溅与飞溅+加载环的布局相同。
【问题讨论】:
标签: c# xaml windows-8 winrt-xaml