Frequently Asked Silverlight Interview Questions
1. What is Silverlight?
Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of Microsoft .NET–based media experiences and rich interactive applications for the Web. It is combination of different technolgoies into a single development platform that allows you to select tools and the programming language you want to use. Silverlight integrates seamlessly with your existing
Javascript and ASP.NET AJAX code to complement functionality which you have already created. Silverlight aims to compete with Adobe Flash and the presentation components of Ajax. It also competes with Sun Microsystems’ JavaFX, which was launched a few days after Silverlight.
2. What features are available in the Silverlight 1.1 Alpha?
The Silverlight 1.1 Alpha includes all the features available in Silverlight 1.0 Beta plus a number of new features focused primarily on improving the developer productivity and power, including:
? Managed code support
? Support for dynamic languages including managed Microsoft JScript and Python
? Rich UI control model based on WPF
? Improved networking stack with support for REST, RSS, JSON, and POX
? Enhanced, two-way HTML/AJAX bridge
? Comprehensive and consistent base class library
? Support for LINQ (LINQ to Objects, LINQ to XML)
3. Which platforms and browsers will Silverlight support?
Silverlight will support all major browsers on both Mac OS X and on Windows. Particular care is being taken to account for differences in platform and browser capabilities to ensure a consistent experience including experiences on FireFox, Safari, and Internet Explorer.
4. What is the difference between WPF and Silverlight?
Silverlight uses a particular implementation of a XAML parser, with that parser being part of the Silverlight core install. In some cases, the parsing behavior differs from the parsing behavior in Windows Presentation Foundation (WPF), which also has a particular implementation.
5. What is XAML?
Extensible Application Markup Language (XAML, pronounced zammel) is a declarative XML-based language created by Microsoft which is used to initialize structured values and objects.
6. Can you name built-in layout panels you have been using with Silverlight?
You are looking for Canvas, StackPanel and Grid
7. What is Storyboard?
Storyboard is a Silverlight class with controls animations with a timeline, and provides object and property targeting information for its child animations
8. Will Silverlight support HD quality?
Yes, Silverlight supports 720p, HD quality with considerable performance benefits over other solutions. Performance is dependent upon the central processing unit (CPU) capabilities of your computer and configurations. Generally, in testing, a 3-gigahertz (GHz) CPU and/or dual-core support greatly benefit the HD playback experience.
9. What audio or video formats are supported in Silverlight?
Silverlight supports Windows Media Audio and Video (WMA, WMV7–9) and VC-1, as well as MP3 audio. Additional formats may be available by the final release based on customer feedback.
10. Will Silverlight support all the codecs Windows Media Player supports?
Since Silverlight is a lightweight cross-platform technology, it only carries the most common codecs that are needed for Web playback. However, we are gathering information from customers about the needed codecs and can update Silverlight when necessary.
11. What are the different ways to display text with Silverlight?
Silverlight supports displaying static preformatted text that is comprised out of glyph elements and also dynamic text that uses TextBlock. With glyphs, one needs to position the characters individually while TextBlock supports simple layout.
12. What kinds of fonts are supported with Silverlight?
Beyond standard and western fonts, Silverlight also supports East Asian characters, double-byte characters, and can work with any East Asian font or Middle Eastern font by using the glyphs element and a supporting TrueType font file that supports the requested glyph.
13. What is SMPTE VC-1?
VC-1 is an industry-standard video format, recognized by the Society of Motion Picture and Television Engineers (SMPTE), and most notably ships in all HD-DVD and Blu-ray Disc–certified electronics, hardware, and tools. Windows Media Video 9 (WMV-9) is the Microsoft implementation of the SMPTE VC-1 standard video codec. Microsoft initiated development of the standard with the release of WMV-9 to SMPTE.
14. What is Xaml in Silverlight?
Xaml[Extensible Application Markup Language], it is pronounced as Zammel. Xaml is a Xml based language, it contains elements that can be nested in any arrangement.
15. How style works with Silverlight?
Style is collection of property value that apply to an element. First define the style in App.xaml.
Apply style to Button.
16. What are the programming languages in which you can implement behavior of Silverlight application?
C# or Visual Basic programming language can be used.
17. Explain about Silverlight plug-in?
Silverlight plug-in is easy to download and takes few second to install on client’s system. It is necessary to access Silverlight object that is embedded in web page. User has to download this plug-in for only one time.
18. What is ClientBin folder in Silverlight application?
ClientBin folder is folder in Silverlight application which store .xap file.
19. What is .xap file?
A .xap file is a created when Silverlight project is built. It includes AppManifest.xaml, assembly of Silverlight project and resource files referred by Silverlight application.
20. What files are contained by .xap file?
A .xap file contains application manifest [AppManifest.xaml] and all the DLLs required by the application.
21. What is Silverlight SDK?
Silverlight SDK contains samples, documentations, libraries and tools for developing Silverlight application.
Silverlight SDK is not necessary for creating Silverlight application but its makes development easy.
22. What is official name of Silverlight?
It is WPF/E.
23. Silverlight is developed in which languages?
Silverlight is developed in C# and C++.
Expression Studio orVisual Studio, which one better to use for developing Silverlight application?
Expression Studio and Visual Studio both are used for creating Silverlight application.If Silverlight application has graphics and visual elements then its good to work with Expression Studio. If Silverlight application has programming coding then its good to use Visual Studio.
24. For Windows,what are system requirement for Silverlight?
Operating System – Windows 7, Windows Vista, Windows XP SP2.
Processor – Intel Platinum III
RAM – 128MB
25. Is it possible to consume WCF and Web Services in Silverlight application?
Yes, it is possible.
26. What are those platforms which supports Silverlight?
1. Windows XP Service Pack 2
2. Windows 2000
3. Windows Vista
4. Windows Server 2003
5. Mac OS
6. Linux Moonlight
27. What are those browsers which supports Silverlight?
Internet Explorer 6,7,8
Mozilla Firefox 2,3
Safari 3,4
Google Chrome
28. What are deep zoom and deep zoom composer?
Deep zoom composer is tool in Silverlight which make image with deep zoom feature. Actually Deep zoom is feature in Silverlight which zoom in and out of images rapidly without affecting the performance of application.
Its Deep zoom composer which creates high resolution composition for image for smooth zooming.
29. What are differences between Silverlight and WPF?
1. Silverlight is used for developing RIA for web application whereas WPF is using for windows applications.
2. Silverlight supports cross-browser, cross-platform whereas WPF supports windos only.
3. Silverlight is add-on machnism for most of the browsers but it is necessary to run Silverlight plug-in once on client’s system. But with WPF, it is necessary to install WPF client application on client’s system.
4. Silverlight is small subset of .NET framework to optimized its size. WPF has full access to main .NET framework and its assemblies.
30. What are differences between Silverlight and Asp.Net?
1. Silverlight runs on client’s system whereas Asp.Net runs on the server.
2. When an event fires, Silverlight handles the event on the client whereas in Asp.Net, the browser will make an Http Post to the server.
3. Silverlight can’t work directly with database, it consumes data from web service whereas Asp.Net supports working with database.
31. How Silverlight 4 is different from Silverlight 3?
There are a lot of new features in Silverlight 4 that are not present in Silverlight 3 :-
Print Support
WebCam / Microphone Support
Mouse right click event handling
RichTextArea Control
Multicast network support
Silverlight hosting in HTML 4
Google Chrome support
32. What is Silver light Run time?
Silver light run time is a plug-in for browsers to support silver-light enabled applications. If silver light run time is not installed, browsers will not be able to run silver light elements in the browser. We can setup the silver light tags such a way that your browser will automatically prompts the user to download and install the silver light plug-in when your application is launched in the browser.
33. Can we add the reference of class library project in silver light application project?
No, we can’t add the reference of class library inside the silver light application project. We can only add the reference of another silver light application project inside the silver light application project.However, we can add the reference of Web Service or WCF Service.
34. What is .xap file?
A .xap file is a silver light based application package that is generated when the silver light project is built.Once we have created the .xap file, the silverlight plug-in downloads the file and runs it in a separate workspace.
35. What is the use of Client Bin folder?
Client Bin folder is used to place the .xap file of silver light application. We can keep this anywhere in our web application but this is the default that is used by silver light.
36. How to change the default page of silver light application?
To change the default page of silver light application, you need to set the Root Visual property inside the Application_Startup event of App.xaml file.
Eg:
private void Application_Startup(object sender, StartupEventArgs e)
{
this.RootVisual = new YourPage();
}
When you create a new project in silver light through Visual Studio, how many xaml files are created and what are the uses of those files?
Two xaml files are created in silver light project. They are (i) App.xaml (ii) MainPage.xaml
1.App.xaml – App.xaml is a file used to declare shared resources like brushes, various style objects etc. and to handle the global application level events (this is almost similar to global.asax file in asp.net application). By default following events are created in the App.xaml.cs
Application_Startup
Application_Exit
Application_UnhandledException
ReportErrorToDOM
2.MainPage.xaml or Page.xaml – This page is the default page of the silver light application and when the silver light application runs this becomes the default page to appear (this page is like the default.aspx page of asp.net application)
37. Can you provide a list of Layout Management Panels and when you will use them?
Canvas Panel: Use the canvas for simple layouts and when there is no need to re-size panel. Controls can overlap each other when resizing the panel.
Stack Panel: Use this for grouping controls in a stack (horizontal/vertical). Controls do not overlap.
Grid Panel: Most flexible, multi rows/columns layouts. Similar to a HTML table.
38. What are the steps will followed when consuming WCF in silver light?
4 simple steps to consume WCF service using Silver light
– Create the WCF service
– Enable Cross Domain for your WCF service
– Add the WCF service reference
– Call the Service
39.What is Isolated Storage?
Silver light uses isolated storage as a virtual file system to store data in a hidden folder on your machine.
It breaks up the data into two separate sections:
Section #1 contains the administrative information such as disk quota
Section #2 contains the actual data.
Each silver light application is allocated its own portion of the storage with the current quota set to be 1 MB per application.
Is it possible to create a silverlight application without .NET Framework ?
It is possible to create a silverlight application without using .NET Framework.
This is so because, the silverlight framework version 4.0 includes a compact version of .NET.
So, it works independently.
40. How can be a silverlight application shown in Full-Screen mode ?
You can show the silverlight application in full-screen mode by using the following command:
Application.Current.Host.Content.IsFullScreen = true;
41. How can be the default page settings changed for a silverlight page ?
You can change the default page settings of a silverlight page.
This can be done by setting the RootVisual property in the Application_Startup event of the App.xaml file.
This is done as follows:
Private void Application_StartUp(object sender, StartupEventArgs e)
{
this.RootVisual = new MainPage();
}
42. Give the reasons how Ajax is better than a Java applet ?
As we know that, the applications with Ajax runs faster when compared to Java applet.
This is because, Java applets load big sized libraries.
But in Ajax, code resides on the web server where, only the required event in the user interface is posted back to the server.
43. Give an example of creating button in XAML ?
In XAML, a button can be created as in the following example:
Example:
But in Visual Studio, you can directly create a button.
44. Which types of video files can silverlight support ?
Silverlight can support many types of video files.
This platform can support MP3, Windows Media Audio format (wma, wmv7-9), and also VC-1 formats.
45. Explain Deep Zoom in silverlight ?
Deep Zoom is one of the features of silverlight.
This Deep Zoom function is to zoom in and zoom out the application.
The main advantage of this zooming is that, it will not affect the performance of the application.
nguage
46. What is .xap file in context of Silverlight?
The .xap file is a compressed output file for the Silverlight application. This file includes AppManifest.xaml, compiled output assembly of the Silverlight project (.dll) and other resource files referred by the Silverlight application.
47. What browsers and platforms are supported by Silverlight version 2?
Silverlight version 2 supports all popular browsers like Internet Explorer,Firefox,Safari on Both Mac OS and windows OS.
48. What is story Board in Silverlight?
A Storyboard in the Silverlight is a container where we can put animation objects. We need to make the Storyboard a resource that is available to the objects that we want to animate.
49.What is Easing Functions in Silverlight?
Easing functions is used in Silverlight to utilise custom mathematical formulas to animations. For example,if we want an object to oscillate we could use we can use a corresponding mathmetical function to accurately depict this motion.
50. What happens if we press F5 in Visual Studio to run a Silverlight Application?
The following happens if we press F5 in Visual Studio to run a Silverlight Application.
a)A new folder is created in website project.(It happens only first time)
b)The name of the folder is Clientbin.
c)The folder contains the packages with .xap extension.