Windows 8 Metro App (Grid Application) transition with black flickering

a 夏天 提交于 2019-12-11 01:12:06

问题


I'm building a Windows 8 Metro App based on the Grid Application template. Everything was going smoothly until I tried to change the Theme and Background of the App.

I applied an Image Background to all 3 XAML Page's Grid. Also, I changed the Theme to "Light" in the Application Package Manifest, but it didn't do anything.

After searching I found a solution, setting RequestedTheme="Light" in the App.xaml

Now, I have a Light themed Application with the background I want, but every time I navigate to a diferente Page it has a black flicker. It seems the transition still has the Black Theme.

Is that the problem? How do I change that?

Thanks


回答1:


In App.xaml.cs, set the background property of the app's root frame. You can do it in the overridden OnLaunch method, just before navigation to the initial page.

rootFrame.Background = new SolidColorBrush(Colors.White); //whatever color



来源:https://stackoverflow.com/questions/11051195/windows-8-metro-app-grid-application-transition-with-black-flickering

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!