摘要:
Silverlight Tip of the Day #10 – How to Dynamically Load and Display Images 在Silverlight中加载图片是非常方便的。第一步是创建Uniform Resource Identifier (URI)。URI本质上是指向资源的一个字符串。资源可以直接放在项目中,也可以放在Internet上。本地读取的图片需要直接加在工程... 阅读全文
摘要:
Silverlight Tip of the Day #9 – How to Capture the Size of your Browser when it is Resized. 在这章中,我将告诉你当浏览器改变大小时如何获取它的大小。当你想把你的元素对齐到浏览器的边框上,或者在屏幕上居中显示你的人物,等等,这都是必要的工作。 为了完成这项工作,我们简单地为 App.Current.Hos... 阅读全文
摘要:
Silverlight Tip of the Day #8 - Silverlight Blogs and Resources (一大坨链接,需要翻译么?) The following is my list of Silverlight Resources including blogs, tutorials and more. If you know of any other good ones... 阅读全文
摘要:
Silverlight Tip of the Day #7: Creating Transparent PNG files for Silverlight 对于Silverlight2不支持的GIF而言,透明处理是非常容易的,因为你只需要指定哪种颜色作为你的透明色即可。对于PNG则有点困难。你需要使用编辑工具把你不希望显示的区域清除掉。有一些工具可以做这样的事情,现在我将带你们做一下。 (这篇属于... 阅读全文
摘要:
Silverlight Tip of the Day #6: Monitoring for Keyboard and Mouse Events. Silverlight 2提供了鼠标和键盘事件的完整支持。你不仅可以监听整个应用程序的事件还可以在独立的控件级别监听它们。 下面是一个在应用程序级别监听所有键盘和鼠标事件的例子: Page.xaml.cs: namespace Silverligh... 阅读全文
摘要:
Silverlight Tip of the Day #5: Timers and the Main Game Loop 游戏主循环 游戏主循环是游戏的核心. 在这里你将执行游戏的主要任务,包括: 游戏AI 动画 - 更新物体以及它们的位置。 等等... 在这章里我将演示如何使用DispatcherTimer建立游戏主循环。在游戏主循环中可选的方法包括: ... 阅读全文
摘要:
Silverlight Tip of the Day #4: Building the Game Interface Using the Grid Control. Silverlight提供了 控件用来规划你游戏的界面。这个控件也支持在grid中内嵌grid,就像Word中表格可以内嵌表格一样。 在创建我们的游戏"Fireball"的界面之前,先让我们来看一下最终的界面效果: 游戏的UI是存... 阅读全文