Note: Currently, only version 4 of Silverlight will run in Google Chrome on a Mac OS X; and only version 5 of Silverlight will run in a 64-bit version of Internet Explorer. Microsoft Silverlight 5.0 Compatible Browsers and Operating Systems. Silverlight 64 bit download - X 64-bit Download - x64-bit download - freeware, shareware and software downloads.
- Silverlight Tutorial
- Silverlight Useful Resources
- Selected Reading
In this chapter, we will look at a working example of Silverlight. We need two things −
First, we require a web page. Silverlight is intended for rich internet applications, It is designed to run inside of a web browser as part of a web page. The page needs to incorporate a suitable tag to load the Silverlight plug-in. It can also include the logic to detect whether Silverlight is installed, and can provide some fallback user interface, when it is absent.
The second thing we need is the Silverlight content itself. This tutorial will focus on the .NET programming model for Silverlight. We will create a compiled Silverlight application containing a mixture of XAML, the mockup language we use to define Silverlight user interfaces, and .NET code written in C#.
Create a Web-page
The easiest way to start using Silverlight is to create an ordinary website with HTML pages and no server side code. Let us look at a very simple example.
Step 1 − Open Visual Studio. Click the File menu, point to New and then click Project.
Step 2 − A New Project dialog box will open. Under Templates, select Visual C# and then click Silverlight. In the right pane, choose Silverlight Application.
Enter a project name and a location on your hard drive to save your project and then click OK to create the project.
The Silverlight project itself is just going to build the Silverlight content, and that content is just one asset amongst many that are going to make up the whole web application.
Click OK.
Step 3 − Check the Host the Silverlight application checkbox. The default is an ASP.NET Web Application Project.
Step 4 − MS-Visual Studio has created two projects, the Silverlight project and an ASP.NET web application. Now, we do need an ASP.NET web application. You can see this in the Solution Explorer window as shown below.
Anything that can serve up the content via HTTP will do but this is Visual Studio, and it understands the ASP.NET web technology, so that is what it gives us.
To demonstrate that Silverlight does not depend on any particular server-side technology, let us delete this .aspx file, leaving just the plain static HTML file.
Step 5 − Right-click FirstExampleTestpage.aspx. From the list of options, click Delete.
Step 6 − Set FirstExampleTestPage.html as the Start page.
The MainPage.xaml file defines the user interface for Silverlight content. Either you can write XAML code directly or you can also use Toolbox to drag and drop different UI elements.
Step 7 − Given below is a simple code in MainPage.xaml in which a Button and a TextBlock are defined inside the StackPanel.
Step 8 − This example assumes that you have created an event-handling method named ClickMe_Click. Here is what it looks like in the MainPage.xaml.cs file.
Step 9 − A Silverlight application can be run on any installed browsers.
Step 10 − When the above code is compiled and executed, you will see the following webpage.
Step 11 − Now, when you click the Click Me button, it will update the text in the TextBlock as shown below.
We recommend you to execute the above example by adding some more UI elements.
Symptoms
When working with Microsoft Silverlight you may encounter the following scenarios:
Install Microsoft Silverlight
Upgrade to another version of Microsoft Silverlight
Uninstall Microsoft Silverlight
Microsoft Silverlight does not work as expected
Attempts to restart the computer and try to upgrade, install or uninstall Microsoft Silverlight again end in the same results.
Cause
This issue can occur if an existing installation or uninstall has become corrupt.
Resolution
Silverlight 64
To automatically uninstall Microsoft Silverlight, click the button in the 'Fix it for me' section. If you would rather verify and update these keys yourself, go to the 'Let me fix it myself' section.
Fix it for me
Note This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.
Note If you are not currently using the computer that is experiencing this problem, you can save the automatic fix to a flash drive or to a CD, and then you can run it later on the computer in question.
When the Fix it solution has completed, click the link below to install the latest version of Microsoft Silverlight:
http://www.microsoft.com/getsilverlight/get-started/install/default.aspx
Let me fix it myself
To resolve this issue yourself, follow these steps:
Click Start and type Notepad in the Search box
Double-click on Notepad from the list of results above
Copy and then paste the following text into Notepad.
Click File and Save As and type CleanSilverlight.cmd
In the Save astype box, click All Files (*.*)
In the Save in box, click Desktop, and then click Save
On the File menu, click Exit
Right-click the CleanSilverlight.cmd file on your desktop and click Run as administrator
When the uninstall completes, right-click the CleanSilverlight.cmd file on your desktop and click Run as administrator a second time
Once the uninstall has completed, click the link below to install the latest version of Microsoft Silverlight
http://www.microsoft.com/getsilverlight/get-started/install/default.aspxDelete the CleanSilverlight.cmd file from your desktop.
More Information
Silverlight 64-bit
Microsoft Community
Have other questions? To obtain free support, check out our Microsoft Community. There, you can search for answers or ask other users specific questions. Click the following link to visit the Microsoft Community Forums: http://answers.microsoft.com
Questions specific to Silverlight