BANGALORE, INDIA: Silverlight 3 Beta enables youto run and create applications for your desktop, which means you can use them without Internet connectivity. You can store and use Silverlight apps locally without having to download extra plug-ins. Besides, Silverlight 3 based apps are able to detect Internet connectivity and react intelligently like caching user data, etc. As these applications run inside a secure sandbox environment with persistent isolated storage, they are quite safe to use.
To build a Silverlight 3 based app, you need either Visual studio 2008 SP1 or Visual Web Developer Express 2008 SP1. In this implementation, we have used the latter. Now to add Silverlight 3 application building capability to this IDE, download and install Silverlight 3 Beta Tools for Visual Studio from http://tinyurl.com/cgzacz.
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300">
To install Silverlight app locally, simply right click on browser window and click on Install. As shown above, one can add a shortcut to the desktop and Start Menu. |
In this application, we have created a button click event 'Mouse_Clicked' and storyboard named 'Storyboard1'. This application creates animation on left mouse click. With this event, the Gold color in browser will change to Silver in four seconds. Here is the sample code of 'MainPage.xaml.cs' file that simply initiates animation :
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace SilverlightApplication1
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
private void Mouse_Clicked(object sender, MouseEventArgs e)
{ Storyboard1.Begin(); }
}
}
So far, this application looks like any other Silverlight application. To make this application run from your desktop, you need to change 'AppMainfest.xml' file present under 'Properties' in solution explorer . Here is the content of this 'AppMainfest.xml' file :
Here is thesame Silverlight app running from your desktop in a window titled 'Silverli ght Animation - localhost '. To remove it, right click and click 'Remove this application'. |
Title="Silverlight Animation">
Here '
If you want to remove this application, simply right click on out of browser window and click on 'Remove the application'. Silverlight 3 Beta also comes with improved audio and HD video support, 3-D graphics and pixel shading effect, and enhanced data
support.