Windows phone 8 如何防止在WP8中启动应用程序时出现黑白屏幕?
我已经为Windows Phone 8创建了一个IBM Worklight 6.1应用程序。Windows phone 8 如何防止在WP8中启动应用程序时出现黑白屏幕?,windows-phone-8,ibm-mobilefirst,Windows Phone 8,Ibm Mobilefirst,我已经为Windows Phone 8创建了一个IBM Worklight 6.1应用程序。 我构建了应用程序并将其部署到设备上 我将看到以下屏幕: IBM闪屏 黑屏 白屏 应用程序界面 如何不显示2和3 问题中报告的问题的一些更新: “启动图像后出现黑屏” 这个问题已经解决了。没有可用的本地解决方法。 可通过为Worklight 6.1和6.2请求iFix “黑屏之后的白屏” 此问题尚未解决,但有望解决。 可以应用以下临时解决方法: 在生成的Visual Studio项目中,打开Ma
我构建了应用程序并将其部署到设备上 我将看到以下屏幕:
问题中报告的问题的一些更新:
可通过为Worklight 6.1和6.2请求iFix
可以应用以下临时解决方法:
- 在生成的Visual Studio项目中,打开MainPage.xaml>MainPage.xaml.cs
- 执行以下操作并在Visual Studio中运行
private async void CordovaView_Loaded(object sender, RoutedEventArgs e)
{
var frame = App.Current.RootVisual as PhoneApplicationFrame;
PhoneApplicationPage page = frame.Content as PhoneApplicationPage;
WebBrowser br = (page.FindName("CordovaView") as CordovaView).Browser;
double savedHeight = br.ActualHeight;
br.Height = 0; // make the browser height to 0 until the html is loaded
BitmapImage b1 = new BitmapImage(new Uri("SplashScreenImage.jpg", UriKind.Relative));
ImageBrush imgBrush = new ImageBrush();
imgBrush.ImageSource = b1;
frame.Background = imgBrush;
await Task.Delay(TimeSpan.FromSeconds(3)); // avoid flickering
br.Height = savedHeight;
}
对于深色主题-框架背景为黑色;对于灯光主题,框架背景为白色 一种可能的解决方法是将框架的颜色与第一页的颜色相匹配 要更改帧背景颜色,必须在app.xaml.cs的InitializePhoneApplication()中添加以下行(创建根框架实例后)
您使用什么Worklight版本?具体开发什么?@ShmulikBardosh Worklight版本:IBM Worklight 6.1和设备:HTC 8X Windows Phone 8@dhineshsundar,这只是第一次启动应用程序,还是所有应用程序都启动?@IdanAdar每次启动应用程序。您在模拟器上试用过吗?您是否浏览了这些入门模块以确保没有遗漏任何内容:、,
private async void CordovaView_Loaded(object sender, RoutedEventArgs e)
{
var frame = App.Current.RootVisual as PhoneApplicationFrame;
PhoneApplicationPage page = frame.Content as PhoneApplicationPage;
WebBrowser br = (page.FindName("CordovaView") as CordovaView).Browser;
double savedHeight = br.ActualHeight;
br.Height = 0; // make the browser height to 0 until the html is loaded
BitmapImage b1 = new BitmapImage(new Uri("SplashScreenImage.jpg", UriKind.Relative));
ImageBrush imgBrush = new ImageBrush();
imgBrush.ImageSource = b1;
frame.Background = imgBrush;
await Task.Delay(TimeSpan.FromSeconds(3)); // avoid flickering
br.Height = savedHeight;
}
RootFrame.Background = new SolidColorBrush(Colors.White);