Top 41 Microsoft Silverlight Interview Questions
Q1. Give An Example Of Creating Button In Xaml ?
In XAML, a button may be created as in the following example:
Example:
<Grid x:Name="LayoutRoot" Background="White">
<Button Width="60" Height="30">Click Here</Button>
</Grid>
Q2. Explain Silverlight Architecture?
Silverlight is a plugin this is provided through the Microsoft. Silverlight architecture consists of the functionality from core .NET framework, Ajax and having some of its very own capability including animation, media and so forth. The architecture consists of 4 blocks:
.NET framework additives: WPF is .NET framework, used in Silverlight.
Presentation center: center presentation framework includes the display alternatives such as pics, vector animations and so on.
Other technologies: Ajax and JavaScript technologies are used to have interaction with Silverlight framework.
Hosting: Silver-mild animations run below the browser environment and it additionally presents plenty of different utility hosting packages.
Q3. How To Change The Default Page Of Silver Light Application?
To trade the default page of silver mild software, you want to set the Root Visual assets inside the Application_Startup occasion of App.Xaml document.
Example:
personal void Application_Startup(object sender,StartupEventArgs e)
this.RootVisual = new YourPage();
Q4. What Happens If We Press F5 In Visual Studio To Run A Silverlight Application?
The following occurs if we press F5 in Visual Studio to run a Silverlight Application.
A)A new folder is created in internet site challenge.(It takes place only first time)
b)The name of the folder is Clientbin.
C)The folder includes the packages with .Xap extension.
Q5. What Is The Real Advantage Of Using Excel/word Files Or Local Database In Silverlight?
The actual benefit of the usage of Excel or World files or any nearby database in Silverlight is that it gives clean to control capabilities for keep and fetching the records, which are often utilized by the programs. It doesn’t depend an awful lot on WCF offerings to provide the residences for records communique. The information is robotically fetched and saved in excel or phrase sheets for future references.
Q6. Does Silverlight Application Supports Desktop Implementation?
Yes, Silverlight helps laptop implementation. Newer model of Silverlight gives out-of-browser facility, through the usage of this feature it can be bodily deployed on the local system. Silverlight 4.0 helps OOB facility that complements the conversation with different applications like Word, Excel and many others. And with the neighborhood database like MS Access and so forth.
Q7. What Is Storyboard?
Storyboard is a Silverlight magnificence with controls animations with a timeline, and provides object and assets focused on records for its baby animations
Given XAML under Code:
<Canvas> <Ellipse x:Name="ellipseTest" Height="20" Width="20" Canvas.Left="0" Canvas.Top="10" /> </Canvas>
Q8. What Is Easing Functions In Silverlight?
Easing features is used in Silverlight to utilise custom mathematical formulation to animations. For instance,if we want an object to oscillate we ought to use we will use a corresponding mathmetical characteristic to appropriately depict this movement.
Q9. Can We Add The Reference Of A Class Library Project In Silverlight Application Project?
No, You cannot upload the reference of a Class library inside the Silverlight application challenge. You can simplest upload the reference of another Silverlight software venture inner a Silverlight application undertaking.
However, you may upload the reference of a Web Service or WCF services.
Q10. How Can Be A Silverlight Application Shown In Full-screen Mode?
You can show the silverlight utility in complete-display mode by the usage of the subsequent command:
Application.Current.Host.Content.IsFullScreen = authentic;
Q11. What Is Silverlight Run Time?
Silver light run time is a plug-in for browsers to help silver-light enabled programs. If silver light run time isn't hooked up, browsers will not be able to run silver light factors in the browser. We can setup the silver mild tags one of these way that your browser will mechanically activates the user to down load and install the silver mild plug-in whilst your utility is released in the browser.
Q12. What Are The Advantages Of Extensible Application Markup Language (xaml) Over C# Or Vb.Internet?
XAML is the language that's used with Silverlight. It is one of the developing languages that has plenty of features and homes. The benefits of it over C# or VB.NET are that:
C# or VB.NET offer improvement by the usage of coding whereas, XAML affords codeless improvement and presents lots of functions to create complex user interface controls and many others. It can also outline an instance of sophistication that's being already defined via C# or VB.NET.
Q13. What Is .Xap File?
.Xap file is a silver light primarily based utility package this is generated when the silver light assignment is built.Once we've created the .Xap document, the silverlight plug-in downloads the report and runs it in a separate workspace.
Q14. Can You Provide A List Of Layout Management Panels And When You Will Use Them?
Canvas Panel: Use the canvas for easy layouts and whilst there may be no need to re-size panel. Controls can overlap every different when resizing the panel.
Stack Panel: Use this for grouping controls in a stack (horizontal/vertical). Controls do now not overlap.
Grid Panel: Most flexible, multi rows/columns layouts. Similar to a HTML desk.
Q15. Can You Name Built-in Layout Panels You Have Been Using With Silverlight?
You are searching out Canvas, StackPanel and Grid.
Q16. What Is The Difference Between Wpf And Silverlight?
Silverlight makes use of a specific implementation of a XAML parser, with that parser being a part of the Silverlight center deploy. In a few cases, the parsing behavior differs from the parsing behavior in Windows Presentation Foundation (WPF), which also has a selected implementation.
Q17. What Are The Restrictions Of Web Service Accessing In Silverlight?
Silverlight provides and supports plenty of features however there are some regulations as nicely, such as WS-Security and WS-Addressing are not supported. When operating with the languages which include ASMX/JAVA/PHP, you need to see which you have SOAP 1.1 and WS-I Basic Profile 1.@Silverlight only assist GET and POST moves, others aren't supported. It doesn’t have full http features also.
Q18. What Is The Use Of Clientbin Folder?
ClientBin folder is used to area the .Xap file of Silverlight utility. You can preserve this anywhere to your web software but that is the default this is used by the Silverlight.
Q19. Can We Add The Reference Of Class Library Project In Silver Light Application Project?
No, we can’t add the reference of class library in the silver mild application mission. We can only upload the reference of any other silver light utility undertaking within the silver mild utility project.However, we are able to upload the reference of Web Service or WCF Service.
Q20. What Are The Steps Will Followed When Consuming Wcf In Silver Light?
4 simple steps to devour WCF carrier the usage of Silver mild
Create the WCF carrier
Enable Cross Domain for your WCF provider
Add the WCF provider reference
Call the Service
Q21. What Type Of Applications Can Be Developed Using Silverlight?
Silverlight is a plug-in, which may be used to increase internet based or cell based programs. Silverlight is used in those packages wherein you need to symbolize the photographs or the output should be in graphical format. Silverlight may be used in various types of Line-of-Business applications together with: Healthcare, Insurance, Logistics and so forth. One of the best example of its application is healthcare utility.
Q22. What Is Silverlight.Js File?
Silverlight.Js is a helper file which allows Web websites to create superior Silverlight set up and instantiation stories.
Q23. What Is Name Scope In Silverlight?
Name scope in Silverlight stores the connection between XAML and the objects which are being defined with the aid of the XAML, with their instance equivalents. Whenever, you create a new item, a brand new call scope will routinely be created. But, there's a problem on this, whilst call scope is being created for the dynamic gadgets, once in a while it causes an exception to occur or a few kind of mistakes.
Q24. What Is .Xap File In Context Of Silverlight?
The .Xap report is a compressed output record for the Silverlight application. This file consists of AppManifest.Xaml, compiled output meeting of the Silverlight task (.Dll) and other resource documents referred by means of the Silverlight software.
Q25. What Is Story Board In Silverlight?
A Storyboard within the Silverlight is a box wherein we will positioned animation gadgets. We need to make the Storyboard a aid that is to be had to the objects that we need to animate.
Q26. What Is Xaml ?
Extensible Application Markup Language (XAML, reported zammel) is a declarative XML-based language created by way of Microsoft which is used to initialize structured values and gadgets.
Q27. What Browsers And Platforms Are Supported By Silverlight Version 2?
Silverlight model 2 supports all famous browsers like Internet Explorer,Firefox,Safari on Both Mac OS and home windows OS.
Q28. What Are The Controls Provided In Silverlight For Line-of-enterprise (lob) Applications?
Silverlight offers masses of packages for Line-of-Business (LOB) to have higher communication most of the factors and also to complement the residences of the application. The controls that are being provided via the Silverlight are as follows:
Data Grid: The representation of information in a grid form
Data Form: Representation of data in a form
Chart controls: Representation of data in chart bureaucracy and has extra functionality to display the controls for personalization.
Q29. How Can Be The Default Page Settings Changed For A Silverlight Page ?
You can exchange the default page settings of a silverlight page.
This may be executed with the aid of putting the RootVisual assets inside the Application_Startup event of the App.Xaml document.
This is achieved as follows:
Private void Application_StartUp(object sender, StartupEventArgs e)
this.RootVisual = new MainPage();
Q30. What Is A .Xap File?
Xap record is a Silverlight-based totally application bundle (.Xap) that is generated whilst the Silverlight project is constructed.
Q31. Which Types Of Video Files Can Silverlight Support?
Silverlight can help many varieties of video files.
This platform can guide MP3, Windows Media Audio layout (wma, wmv7-9), and additionally VC-1 codecs.
Q32. Can You Use Any Specific Patterns In Silverlight Programming?
Yes, you may use any specific styles in Silverlight programming, as it offers Model-View or View-Model approach. This technique affords the supply to create loosely coupled software where the code is completely remoted from XAML. Prism that's a hard and fast of classes furnished for improvement of such programs can also be used to provide extra flexibility.
Q33. Explain Deep Zoom In Silverlight?
Deep Zoom is one of the capabilities of silverlight.
This Deep Zoom feature is to zoom in and zoom out the software.
The main advantage of this zooming is that, it'll no longer affect the performance of the application.
Q34. What Is The Use Of Client Bin Folder?
Client Bin folder is used to place the .Xap report of silver mild utility. We can preserve this anywhere in our internet utility but this is the default this is utilized by silver mild.
Q35. Give The Reasons How Ajax Is Better Than A Java Applet?
As we know that, the programs with Ajax runs quicker whilst compared to Java applet.
This is because, Java applets load massive sized libraries.
But in Ajax, code resides at the web server where, best the desired event within the person interface is posted back to the server.
Q36. What Is The Parent Xaml Tag Of Silverlight Page?
UserControl is the determine xaml tag of the Silverlight page. All different tags are located beneath UserControl tag.
<UserControl x:Class="SilverlightApplication2.MainPage"
xmlns="http://schemas.Microsoft.Com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.Microsoft.Com/winfx/2006/xaml"
Width="400" Height="300">
<Grid x:Name="LayoutRoot" Background="White">
</Grid>
</UserControl>
Q37. What Is The Relationship Between Silver Light, Wpf And Xaml?
Silverlight is used to study and render the user interface (UI) factors. XAML is a XML file that defines the consumer interface elements. This report is being read by the WPF framework. Microsoft developed WPF framework and then prolonged it to WPF/e, which helped the utility to render person interface in the browser. Silverlight is being formally released via Microsoft.
Q38. How Can You Change The Startup Page Of Silevrlight Application?
Open the App.Xaml.Cs file
In the Application_Startup occasion handler, set the RootVisual assets to the example of the particular SilverlIght class
example: if we've got a document known as MainPage.Xaml, a category referred to as MainPage might be there in MainPage.Xaml.Cs.
Private void Application_Startup(item sender, StartupEventArgs e)
this.RootVisual = new MainPage();
Q39. Where Is The Silverlight Application Present?
Silverlight software resides at the host laptop wherein the ASP.NET is established. It resides inside the ASP.NET webpage, but it may be hosted on other HTML pages too, by means of the usage of the extension .Xap. Silverlight application is made available to the browser while a person makes a HTTP request to ASP.NET page.
Q40. What Is Isolated Storage?
Silver mild uses isolated storage as a digital document machine to store data in a hidden folder for your system. It breaks up the statistics into separate sections:
Section #1 contains the administrative data such as disk quota
Section #2 incorporates the real facts.
Each silver light software is allotted its own portion of the storage with the modern-day quota set to be 1 MB per application.
Q41. What Types Of Security Measures Are Provided With Silverlight?
Silverlight is Microsoft primarily based technology and it provide you with some safety capabilities, to make it relaxed to use and enforce. For secure conversation its applications uses WCF services and makes use of WCF safety functions. SSL (Secure Socket Layer) can be used for security mechanism to present the trport layer protection.

