Silverlight interview questions with answers for freshers

What is the difference between Silverlight 1.0 and 2,3,4?

Silverlight 1.0 : Silverlight 1.0 was released in September 2007 ,Silverlight 1.0 supports Javascript Programming Language ,Javascript Language is used to interact with silverlight objects that are executed with in silverlight player int the browser.

Silverlight 2.0 : Silverlight 2.0 was released in Last 2008,Silverlight 2.0 has the abiliyt to create RIA application using code-behind programming model used in WPF,Windows Forms,Web Form Development.

Silverlight 3.0 : Silverlight 3.0 was released in Mid 2009 , which have a capability to create rich user interface , 3D Graphics and Media .

Silverlight 4.0 : Silverlight 4.0 was released in 2010, which was more advanced when compared with 3.0, it has the capability to create Rich internet based application ,as well as a richer feature set for accessing local filesystem and COM resources in richer,and out browser experience .


What is Silverlight Plug-In?

When the client first request a silverlight application , Application will not load in the browser because Silverlight plug in should be installed in the client machine because There will be non-intrusive image on the page where the Silverlight content would have rendered that gives a link to download the player.We can download the silverlight in 2 way.

Standard Installation : Standard Installation means we can download the file from the browser it self when the client request silverlight application.

Prompt : you are prompted to install Silverlight in-place with a download prompt,


Whats new is silverlight 4 ?

Silverlight 4 Is more advanced when compared with silverlight 2 and 3.

Silverlight have great features like


NET Framework support

Graphics and animations

Page layout and design

User interface controls

Audio and video, including capturing audio and video

Local data storage

Out-of-browser capability

Local filesystem access

Navigation Framework

Ink support

Network access

Data binding


Drag and Drop

Deep Zoom


What is XAML?

Since the drawn of visual studio , there is always code and the design are seperated ,hence developer will write the code and designer will design the web pages(like : web designer) Hence developer and designer will always use different tools to develop an web application.

So , In order to over come this problem Microsoft has introduced XAML(Extension Application Markup Language)Language,A developer can able to take the XAML Markup and he can use it directly in the project file because partial classes and code-behind files in Visual Studio 2010 allow you to separate the code logic from the layout and control definitions,

Simply we can say it as XAML will seperate the code logic from the layout and control defintions.

For Example:

if you write a code like <TextBlock /> in XAML means you are actually creating a new instance of the TextBlock class like this:TextBlock t = new TextBlock();

Graphics and Animation in Silverlight:

Silverlight is an advanced technology where we can able to create Graphic interfaces and Complex animations like :

2D and 3D Graphics

Pixel , Blure and dropdown shadow .

Animation Strings and Bounce effects

Local Font and rendering text.


What is EllipseGeometry in silverlight ?

EllipseGeometry is an attribute in XAML language,where we can able to change the shape of an Image from rectangle to Ellips shape by defining the radius X and radius Y.

Syntax :




Width=”200” Height=”150”>










Page Layout and Designs in silverlight ?

Canvas — An absolute positioning panel that gives you an area within which you can position

child elements by coordinates relative to the Canvas area. A Canvas can parent any

number of child Canvas objects.

Grid — Similar to an HTML table, it’s a set of columns and rows that can contain child


StackPanel — A panel that automatically arranges its child elements into horizontal or vertical


DockPanel — Used to arrange a set of objects around the edges of a panel. You specify

where a child element is located in the DockPanel with the Dock property.

WrapPanel — Allows the arrangement of elements in a vertical or horizontal list and has elements

automatically wrap to the next row or column when the height or width limit of the

panel is reached.


What are the User Controls in Silverlight 4 :

Silverlight contain around 34 controls

  1. Calendar
  2. Canvas
  3. CheckBox
  4. AutoCompleteBox
  5. Border
  6. DataGrid
  7. DataPager
  8. DatePicker
  9. Button
  10. DockPanel
  11. Ellipse
  12. Frame
  13. Grid
  14. GridSplitter
  15. HyperlinkButton
  16. Image
  17. Label
  18. ComboBox
  19. ListBox
  20. MediaElement
  21. MultiScaleImage
  22. Password
  23. ContentControl
  24. ProgressBar
  25. RadioButton
  26. ScrollBar
  27. ScrollViewer
  28. Slider
  29. StackPane
  30. TextBox
  31. TreeView
  32. TabControl
  33. TextBlock
  34. Rectangle


How can we use Media Element is Silverlight ?

We can embed Media files in silverlight page by just adding a simple attribute “MediaElement” with destination source from the Hard Disk

Syntax :

<MediaElement Source=”Images/MyVideo.wmv” />

Silverlight supports the following Media Formates

WMV 1,2,3,4 ,WMVC1,H.264,and Audio Formates like WMA 7,8,9,10 ,AAC,MP3


Navigation Framework in Silverlight ?

You can acheive this functionality using 2 silverlight controsl


2.Page Control

Using Frame and Page Control you can able to partision the view into 2 XAML files in a single silverlight page .

Syntax :

<navigation:Frame x:Name=”Frame”







What is Data Binding in Silverlight ?

Similarly to the data-binding features in WPF, Silverlight supports data-bound controls, XAML

markup extensions, and support for data context binding. Most of the time, your bindings are set

up in XAML, which is where the markup extensions come into play. In the following XAML, the

Text property of the TextBlock element uses the Binding markup extension to bind the Title field

from the data source:


<TextBlock x:Name=”Title”

Text=”{Binding Title, Mode=OneWay}” />

The field Title from the original data source is retrieved from the data content of the control’s parent element; in this case, the TextBlock could be contained in a Canvas or Grid object. Once you

set the DataContext property for the parent element, the data contained in that object is available for binding to anything it contains. A more complete example of this data binding looks like this:

<Canvas x:Name=”rootCanvas” Background=”White” >

<TextBlock x:Name=”Title”

Text=”{Binding Title, Mode=OneWay }” />

<TextBlock x:Name=”Name”

Text=”{Binding Title, Mode=OneWay }” />


You would then set the context in the code as follows:

LayoutRoot.DataContext = dataList;



What are the Silverlight project files that are created by Visual Studio.

When you create a silverlight application

visual studio will create follow file in the silverlight application







Web Application files created by visual Studio.


ClientBin Folder






What is Xap file in silverlight ?

Xap is a unit of Deployment in silverlight Application .

Xap extension is ZIP , it is like a compressed file – means multiple files are contained in a single Xap file.

When a browser navigates to a page that has a Silverlight object tag on it, the Silverlight

plug-in is activated, and the XAP file specified in the source parameter in the HTML page begins to


Simply we can say it as when we debug the silverlight application first time , Xap file will be downloaded into the Clientbin folder.

What is Attaching to a Process to Debug in silverlight?

Using Attaching to a Process to Debug in visual studio .Net




Thanks a lot for visiting this site .. Please leave a Comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s