How to create a Silverlight 5 Project?
All of you are familiar with Silverlight and know how to create a Silverlight project. This post is not for the people, who already worked i...- Article authored by Kunal Chowdhury on .
All of you are familiar with Silverlight and know how to create a Silverlight project. This post is not for the people, who already worked i...- Article authored by Kunal Chowdhury on .
All of you are familiar with Silverlight and know how to create a Silverlight project. This post is not for the people, who already worked in Silverlight, but for the people who are very new in this technology and start to work as fresh to make their hands dirty. Also, creating this post to refer the project creation in my upcoming tutorial series.
If you are a beginner to Silverlight, read this post to know how to create a Silverlight project.
Before doing anything, you first need to setup your development environment. Silverlight 5 Beta has been released on 13th April 2011 at MIX conference. You can find the installation instruction and download links from the below link:
Once you done with all the installation and ready with your proper development environment, it's the time to start creating your Silverlight 5 Project. Follow the below steps to create your first Silverlight 5 project.
Open Visual Studio 2010 SP1 and go to File -> New -> Project, as shown below:
This will open the "New Project" dialog on the screen. From the left panel, select proper language "C#" or "VB.Net". Expand your targeted language (Visual C# in my case). Now find the template category called "Silverlight" in the same panel. Click it to filter out the Silverlight Templates in the right panel.
From the right panel, select the "Silverlight Application" template. Give a proper name and location for your project and click "OK" to continue.
This will open the "New Silverlight Application" dialog in the screen, as shown below:
Make sure to check the "Host the Silverlight application in a new Web site" checkbox, if you want to host your Silverlight application inside a web project automatically. The IDE will create and configure everything for you.
In the "Options" pane, choose "Silverlight 5" as the Silverlight version. If you want to work with any previous version like Silverlight 3 or Silverlight 4, you can easily change it from here. In our case, we want to create a Silverlight 5 project. Hence, selected "Silverlight 5" as the target version. Click "OK" to continue.
This will create the Silverlight project. In the solution explorer, you will find two projects. One is your main Silverlight application project and the other is your Web Application project which will host your Silverlight XAP.
Now build your project to verify that everything works fine. To build your project, go to build menu or press Ctrl + Shift + B.
Once your build has been successfully completed, you will see the XAP file in your ClientBin folder. This is nothing but the output of your Silverlight Application. Run the ASPX or HTML page to host it in the browser window.
Hope, you are now familiar with creating a blank Silverlight 5 project. In next couple of posts I will discuss on the new Silverlight 5 features. Till then keep learning.
Thank you for visiting our website!
We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.
We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.