[Desklighter]在桌面上运行你的Silverlight文件

Desklighter

今天发现一个小工具,可以把开发的Silverlight .xap 文件转化成 .exe文件,方便的在桌面上运行.

Silverlight是WPF的一个子集,我们可以比较容易的将代码迁移到WPF上来,但是如果我们不想要那么麻烦的话,那么我们可以使用Desklight这个工具直接把Silverlight成果从Web上搬移到桌面上来.

该工具原理很简单,Silverlight在windows下是以Activex控件来实现的,只要在DotNet中新建一个winform程序,然后加入一个ActiveX控件,就可以直接在winform中像在Web中一样直接运行Silverlight程序了。

下载地址:

 http://www.blendables.com/files/folders/desklighter/entry592.aspx

 
Desklighter is a windows utility that will create a “Desklight” from Silverlight xap file. The Desklight is a standalone exe application that renders Silverlight content that is easily portable and accessible. With Desklighter, you can share your Silverlight applications without having to worry about the hosting infrastructure. Distribute your Silverlight content whenever and wherever you need it. The possibilities are endless.

Try this Hello Desklight Sample and see it in action.

 
How to use Desklighter


  • Launch the Desklighter by double clicking the Desklighter.exe file.
  • Select the Silverlight xap file as input.
  • Change the output file name and location if required.
  • Click the 'Convert' button to generate the exe file at specified output path.
Features
Double click the executable created using Desklighter to launch it. Similar to a standard windows application it displays the Silverlight content inside a new window. An example is shown below.

hellodesklight

Information about this executable, including the Desklighter version used to create it, can be found from a command line with 'info' entered as the argument.

hellodesklightinfo

FAQ
  • Why do I need Desklighter?

    The idea of taking the Silverlight application off the web into a portable single file executable opens up a whole new playing field. You can share your Silverlight applications without having to worry about the hosting infrastructure. With Desklighter you can carry your favorite Silverlight content from the web and share with colleagues who are not connected to internet. Distribute your Silverlight content on USB flash drives or in CDs where ever and to whomever you want. The possibilities are endless.

  • But I can create a WPF application to target desktops?

    True. If you are creating a new application targeting desktops, then WPF is the way to go. But if you have an existing Silverlight application that you want to share offline, then the Desklighter comes handy.

  • How is this different from an html file with Silverlight content embedded?

    Having an html file with an embedded Silverlight control is another way to take your Silverlight applications offline. But it requires two loose files (html and xap) and a browser to launch it. Desklight holds everything in a single exe file, which is more convenient and portable.

  • If the Silverlight application is accessing some external data, will it work in a Desklight?

    If the data is available from the computer that is running the Desklight executable, it will work fine. For example, if a game is displaying high scores list retrieved from the internet, the Desklight will display the same data if the computer is connected to internet (Figure 1). If data is not accessible, it will throw an error (Figure 2).

       

    Desklights are best suited for self containing Silverlight applications where all the dependent resources are available within the xap file. Examples include games, presentations, electronic brochures, tools and utilities.

  • What are the system requirements for a Desklight to run?

    A Windows computer with .NET Framework 2.0 and Silverlight plug-in..

  • Will a Desklight work on a Mac or Linux computer?

    No. As of now, it works only on Windows computers.

posted @ 2008-11-26 14:27  IamV  阅读(547)  评论(0编辑  收藏  举报