Q1. Give An Example Of Creating Button In Xaml ?
In XAML, a button can be created as in the following example:
Example:
Q2. Explain Silverlight Architecture?
Silverlight is a plugin that is provided by the Microsoft. Silverlight architecture includes the functionality from core .NET framework, Ajax and having some of its own functionality such as animation, media etc. The architecture consists of four blocks:
.NET framework components:
WPF is .NET framework, used in Silverlight.
Presentation core:
core presentation framework includes the display options such as images, vector animations etc.
Other technologies:
Ajax and JavaScript technologies are used to interact with Silverlight framework.
Hosting:
Silver-light animations run under the browser environment and it also provides lots of other application hosting programs.
Q3. 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.
Example:
private 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 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.
Q5. What Is The Real Advantage Of Using Excel/word Files Or Local Database In Silverlight?
The real advantage of using Excel or World files or any local database in Silverlight is that it provides easy to manage features for store and fetching the data, which are frequently used by the applications. It doesn’t rely much on WCF services to provide the properties for data communication. The data is automatically fetched and saved in excel or word sheets for future references.
Q6. Does Silverlight Application Supports Desktop Implementation?
Yes, Silverlight supports desktop implementation. Newer version of Silverlight provides out-of-browser facility, by using this feature it can be physically deployed on the local machine. Silverlight 4.0 supports OOB facility that enhances the communication with other applications like Word, Excel etc. and with the local database like MS Access etc.
Q7. 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
Given XAML below Code:
Q8. 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.
Q9. Can We Add The Reference Of A Class Library Project In Silverlight Application Project?
No, You can’t add the reference of a Class library inside the Silverlight application project. You can only add the reference of another Silverlight application project inside a Silverlight application project.
However, you can add 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 application in full-screen mode by using the following command:
Application.Current.Host.Content.IsFullScreen = true;
Q11. What Is Silverlight 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.
Q12. What Are The Advantages Of Extensible Application Markup Language (xaml) Over C# Or Vb.net?
XAML is the language which is used with Silverlight. It is one of the growing languages that has lots of features and properties. The advantages of it over C# or VB.NET are that:
C# or VB.NET provide development by using coding whereas, XAML provides codeless development and provides lots of features to create complex user interface controls etc. It can also define an instance of class which is being already defined by C# or VB.NET.
Q13. What Is .xap File?
.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.
Q14. 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.
Q15. Can You Name Built-in Layout Panels You Have Been Using With Silverlight?
You are looking for Canvas, StackPanel and Grid.
Q16. 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.
Q17. What Are The Restrictions Of Web Service Accessing In Silverlight?
Silverlight provides and supports lots of features but there are some restrictions as well, such as WS-Security and WS-Addressing are not supported. When working with the languages such as ASMX/JAVA/PHP, you need to see that you have SOAP 1.1 and WS-I Basic Profile 1.@Silverlight only support GET and POST actions, others are not supported. It doesn’t have full http features also.
Q18. What Is The Use Of Clientbin Folder?
ClientBin folder is used to place the .xap file of Silverlight application. You can keep this anywhere in your web application but this is the default that 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 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.
Q20. 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
Q21. What Type Of Applications Can Be Developed Using Silverlight?
Silverlight is a plug-in, which can be used to develop web based or mobile based applications. Silverlight is used in those applications where you need to represent the graphics or the output should be in graphical format. Silverlight can be used in various types of Line-of-Business applications such as: Healthcare, Insurance, Logistics etc. One of the good example of its application is healthcare application.
Q22. What Is Silverlight.js File?
Silverlight.js is a helper file which enables Web sites to create advanced Silverlight installation and instantiation experiences.
Q23. What Is Name Scope In Silverlight?
Name scope in Silverlight stores the relationship between XAML and the objects which are being defined by the XAML, with their instance equivalents. Whenever, you create a new object, a new name scope will automatically be created. But, there is a problem in this, when name scope is being created for the dynamic objects, sometimes it causes an exception to occur or some kind of error.
Q24. 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.
Q25. 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.
Q26. 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.
Q27. 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.
Q28. What Are The Controls Provided In Silverlight For Line-of-business (lob) Applications?
Silverlight provides lots of applications for Line-of-Business (LOB) to have better communication among the elements and also to enrich the properties of the application. The controls which are being provided by the Silverlight are as follows:
Data Grid:
The representation of data in a grid form
Data Form:
Representation of data in a form
Chart controls:
Representation of data in chart forms and has additional functionality to display the controls for customization.
Q29. 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();
}
Q30. What Is A .xap File?
xap file is a Silverlight-based application package (.xap) that is generated when the Silverlight project is built.
Q31. 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.
Q32. Can You Use Any Specific Patterns In Silverlight Programming?
Yes, you can use any specific patterns in Silverlight programming, as it provides Model-View or View-Model approach. This approach provides the provision to create loosely coupled application where the code is completely isolated from XAML. Prism which is a set of classes provided for development of such applications can also be used to provide more flexibility.
Q33. 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.
Q34. 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.
Q35. 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.
Q36. What Is The Parent Xaml Tag Of Silverlight Page?
UserControl is the parent xaml tag of the Silverlight page. All other tags are placed under UserControl tag.
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”
Width=”400″ Height=”300″>
Q37. What Is The Relationship Between Silver Light, Wpf And Xaml?
Silverlight is used to read and render the user interface (UI) elements. XAML is a XML file that defines the user interface elements. This file is being read by the WPF framework. Microsoft developed WPF framework and then extended it to WPF/e, which helped the application to render user interface in the browser. Silverlight is being officially launched by Microsoft.
Q38. How Can You Change The Startup Page Of Silevrlight Application?
Open the App.xaml.cs file
In the Application_Startup event handler, set the RootVisual property to the instance of the particular SilverlIght class
example:
if we have a file known as MainPage.xaml, a class known as MainPage will be there in MainPage.xaml.cs.
private void Application_Startup(object sender, StartupEventArgs e)
{
this.RootVisual = new MainPage();
}
Q39. Where Is The Silverlight Application Present?
Silverlight application resides on the host computer where the ASP.NET is installed. It resides in the ASP.NET webpage, but it can be hosted on other HTML pages too, by using the extension .xap. Silverlight application is made available to the browser when a user makes a HTTP request to ASP.NET page.
Q40. 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.
Q41. What Types Of Security Measures Are Provided With Silverlight?
Silverlight is Microsoft based technology and it come up with some security features, to make it secure to use and implement. For secure communication its applications makes use of WCF services and uses WCF security features. SSL (Secure Socket Layer) can be used for security mechanism to give the trport layer security.