Windows Phone 7 中的启动画面加载进度动画 [英] Splash screen load progress animation in windows phone 7

查看:21
本文介绍了Windows Phone 7 中的启动画面加载进度动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个 Windows 手机应用程序.当应用程序启动时,它会显示很酷的启动画面,我可以更改图像.但是有没有办法添加一个加载动画,比如那些在屏幕上移动的点.

I have written a windows phone application. When the application starts up it shows the splash screen which is cool and i can change the image. But is there a way to add a loading animation like those dots moving across the screen.

如果我能在启动画面中添加这些动画之一就好了.可以做到吗.如果是,请添加您的答案.

It would be nice if i can add one of those animation in the splash screen. Can it be done. if yes please add in your answers.

推荐答案

截至目前,还没有办法用动画替换显示的加载图像.虽然有解决方法:

As of right now there is no way to replace the loading image that shows up with an animation. Although there are workarounds:

  1. 一起删除图像.不过可能要小心,因为 Microsoft 要求应用程序在启动应用程序的几秒钟内向用户显示某种反馈.仅当您的应用加载速度非常快时才使用此选项.
  2. 将加载屏幕的快照显示为图像,以便在应用加载时您可以显示具有相同背景图像的动画,并且看起来与加载屏幕相同.

在您的情况下,我建议使用带有加载动画的弹出控件(选项 2).要了解如何创建弹出窗口,请转到 这里.或者,如果你想要一个有据可查的弹出窗口,我知道 Telerik 有 自己的版本 也是.

In your case I would recommend using a popup control with a loading animation inside (Option 2). To learn how to create a popup go here. Or if you want a well documented popup I know telerik has there own version as well.

接下来将加载消息放在文本块中或将您自己的图像和动画放在弹出窗口中.显然,最简单的动画是使用 Silverlight 工具包中的性能进度条.

Next place the loading message in a textblock or put your own image and animation inside of the popup. Obviously the easiest animation would be to use the Performance Progress Bar in the silverlight toolkit.

现在您要做的是设置默认打开的弹出窗口.每当您的处理完成时,您所要做的就是将弹出窗口可见性设置为隐藏在您的 C# 代码中.

Now what you'll want to do is set the popup opened by default. Whenever your processing is done all you have to do is set the popup visibility to hidden in your C# code.

可以在此处找到有关如何实现的一些示例:

Some examples of how this is implemented can be found here:

这是一个 XNA 游戏的例子:

And here's an example for an XNA game:

这篇关于Windows Phone 7 中的启动画面加载进度动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆