Microsoft Silverlight Interview Questions
This section covers frequently asked Silverlight interview questions.
1. What is Microsoft Silverlight?
Silverlight was a discontinued application framework for creating rich internet applications (RIAs). It was designed to deliver interactive experiences on various devices and browsers.
2. Browser and Operating System Compatibility.
Silverlight supported multiple browsers and operating systems.
3. Layout Language in Silverlight.
XAML (Extensible Application Markup Language).
4. Silverlight Development Tools.
- Microsoft Visual Studio: For writing code (using .NET languages like C#).
- Microsoft Expression Blend: For designing the user interface.
5. What is RIA (Rich Internet Application)?
RIAs are web applications offering enhanced interactivity and features beyond traditional web pages (like animations, offline functionality, etc.). Silverlight was designed to build RIAs.
6. Components of Silverlight.
- Silverlight plug-in (the browser plugin)
- Hosting webpage (HTML)
- Silverlight application file (.XAP)
- XAML (for the UI)
7. Silverlight.js
File.
Silverlight.js
is a helper file facilitating Silverlight installation and integration within web pages.
8. Important Files in Silverlight Projects.
AppManifest.xaml
: Contains application metadata (entry points, assemblies).Silverlight.js
andCreateSilverlight.js
: Handle Silverlight plugin initialization.
9. ADO.NET Support in Silverlight.
No, standard ADO.NET objects are not directly supported.
10. Silverlight Architecture.
- Core presentation framework: Handles UI rendering (data binding, graphics, etc.).
- .NET framework for Silverlight: Provides .NET libraries and functionalities.
- Updater and installer: For deploying and updating applications.
11. Silverlight Plugin Features.
- Presentation engine
- XAML parser
- .NET runtime
- Media capabilities
- Browser integration
12. .xap
Files.
A .xap
file is a compressed package containing a Silverlight application's assemblies and resources.
13. Using a .xap
File.
The .xap
file is deployed to a web server and referenced in an HTML page using an object tag, allowing the Silverlight plugin to download and run the application within the browser.
14. Tools for Building Silverlight Applications.
- Microsoft Expression Studio: Primarily for UI design.
- Microsoft Visual Studio: For writing code (using .NET languages).
15. .NET Support in Silverlight.
- Embedded CLR (Common Language Runtime)
- Subset of .NET Framework libraries
16. Hosting Silverlight Applications.
You can host Silverlight applications on various web servers (like IIS or Apache). You need to configure appropriate MIME types for .xap
and .xaml
files.
17. WPF vs. Silverlight.
Silverlight was a browser-based technology similar to Adobe Flash, while WPF (Windows Presentation Foundation) was designed for building rich desktop applications. Silverlight's capabilities were a subset of WPF's.
18. Event Handling in Silverlight.
Silverlight 1.0 used JavaScript; Silverlight 2.0 and later used C# (managed code) for event handling.
19. Linux Version of Silverlight.
Moonlight.
20. Silverlight Runtime.
The Silverlight runtime is the component responsible for rendering Silverlight applications in a web browser.
21. Changing the Startup Page.
Modify the Application_Startup
event handler in App.xaml.cs
to set the RootVisual
property.
22. Isolated Storage in Silverlight.
Isolated storage is a secure, sandboxed storage mechanism for Silverlight applications.
23. Full-Screen Mode.
Code (C#)
Application.Current.Host.Content.IsFullScreen = true;
24. Supported Video Formats.
MP3, WMA, WMV, and VC-1.
25. Deep Zoom.
Deep Zoom is a Silverlight feature allowing for seamless zooming of images and other content.
26. Passing Parameters from ASP.NET.
Use the InitParameters
property in XAML to pass parameters from ASP.NET or HTML pages to Silverlight controls.
27. Checking Internet Connection Status.
Code (C#)
if (NetworkInterface.GetIsNetworkAvailable()) {
// Network available
} else {
// Network unavailable
}
28. ClientBin
Folder.
In ASP.NET applications using Silverlight, the ClientBin
folder holds the .xap
file containing the Silverlight application.