Silverlight 3 - Part 1

Sudhakarj21
Posted by in Silverlight category on for Beginner level | Views : 4287 red flag

Silverlight is a Cross-Browser, Cross-Platform plug-in from Microsoft. It supports many features that cannot be done in a normal browser it helps Web Applications to give Rich User Experience using WPF and uses client GPUs to provide this. It also enhances the productivity with the support of .NET APIs, Visual Studio and Expression Blend.
Introduction

This Article will help you to start with using Silverlight 3. Silverlight is a Cross-Browser, Cross-Platform plug-in from Microsoft. It supports many features that cannot be done in a normal browser it helps Web Applications to give Rich User Experience using WPF and uses client GPUs to provide this. It also enhances the productivity with the support of .NET APIs, Visual Studio and Expression Blend.

Features Of Silverlight

1.    It provide execution model in Browser or OutSide of Browser. So Silverlight application can run in a browser or user can download and can run on his system as standalone

2.    To run Silverlight client system should have Silverlight runtime which can be downloaded for different OS in 10s.

3.    Since the application will be deployed on server it is easy to update. The Silverlight application will be downloaded every time when user access the site. It happens in both InSide or OutSide mode

4.    Silverlight runtime has a .NET CLR so you can use .NET Languages and few of the APIs like Networking, WPF etc…. It will not provide all the Libraries that you use in normal .NET CLR.

5.    Silverlight provides better while access Cross Sites and It will not provide access to client side files. It provide a dialogs to Open or Save file.

6.    It provides rich media and UI controls like Media Player, Deep Zoom etc…

7.    Silverlight application will be deployed in XAP that contains XAML and Application Code. This will be download and executed on client side by Silverlight Runtime.


Getting Started

Install

 

1.    Install & Download Silverlight development components for Visual Studio 2008 SP1

a.    Silverlight 3 SDK - http://www.microsoft.com/downloads/details.aspx?FamilyID=1ea49236-0de7-41b1-81c8-a126ff39975b&displaylang=en

b.    Tools for VS2008 SP1 - http://www.microsoft.com/downloads/details.aspx?familyid=9442b0f2-7465-417a-88f3-5e7b5409e9dd&displaylang=en

c.    Silverlight 3 Toolkit (For Additional Controls) - http://silverlight.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=36060

2.    You can install Sliverlight 3 plugin from internet. Before install remove Sliverlight 2 and beta versions

 

 

Simple Tutorial

 

1.    Start Visual Studio 2008

2.    And select Silverlight Application and Create It



1.    You can select the hosting mode. Use the default one so that you can test it using a ASPX Page. You can use pure HTML Page to view Silverlight Application.

 

 

2.    This create 2 Projects one with Silverlight and other ASP.NET App

3.    Silverlight comes with 2 default XAMLs

a.    App.xaml – It is the application entry point and holds the instance and Application level events for Silverlight Application

b.    Mainpage.xaml – It is the display main page where you place all your controls

4.    Now let’s create our UI

5.    Let’s use a standard layout of Grid.

6.    Add few rows to the gird as below in Mainpage.xaml

 

        <Grid.RowDefinitions>

            <RowDefinition Height="100"></RowDefinition>

            <RowDefinition Height="100"></RowDefinition>

        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>

            <ColumnDefinition Width="100"></ColumnDefinition>

            <ColumnDefinition Width="100"></ColumnDefinition>

        </Grid.ColumnDefinitions>

7.    Add a Button

 

<Button Grid.Row="0" Grid.Column="0" Content="Test">

        </Button>

 

 

8. Check the output


 

Conclusion

Silverlight is the next gereneration of Web Technology and it will be the future Goal of most of the Project and Product owners to reduce the Cost on their side by using this and also improving the user experience.

Page copy protected against web site content infringement by Copyscape

About the Author

Sudhakarj21
Full Name: Sudhakar Kottapalli
Member Level: Bronze
Member Status: Member
Member Since: 10/5/2009 7:05:50 AM
Country:



Login to vote for this post.

Comments or Responses

Login to post response

Comment using Facebook(Author doesn't get notification)