Sunteți pe pagina 1din 25

Is ADO.NET objects supported in Silverlight Project?

No, Silverlight project doesn't support normal ADO.NET objects like DataTable, DataSet, DataColumn, Database connection providers like SqlConnection, OledbConnection objects.

You can use System.Data namespace but that contains Services related stuffs not ADO.NET stuffs.

Can we add normal project reference (normal class library) to the Silverlight project?

NOTE: This is objective type question, Please click question title for correct answer.

How can style elements be applied? (similar to a CSS file/skins)

Styles elements are supported in the form of application resources. An app.xaml file can be created containing an application resource Xml construct. The target type for each style is set to the control on which the style needs to be applied.

App.xaml: <Application.Resource> <Style x:Key="MyBorder" TargetType="Border"> <setter property="width" value="5"> </style>

Page.xaml: <Border Style="{StaticResource MyBorder}"> ... </Border>

Can you provide a list of Layout Management Panels and when you will use them?

Canvas Panel:

use a canvas for simple layouts and when there is no need to resize panel. Controls can overlapped each other when resizing the panel.

Stack Panel:

use this for grouping controls in a stack (horizontal/vertical). Controls do not overlapped.

Grid Panel:

most flexible, multi row/columns layouts. Similar to a HTML table

How to set Silverlight contents width as 100%?

Generally you can't set the UserControl width in % like 100% so that the Silverlight contents can spread in the full screen.

To get the 100% width of the screen you can set width="auto" and height="auto".

Which language is used to design the layout in Silverlight?

To design the layout of the Silverlight application, XAML language is used.

Extensible Application Markup Language (XAML, pronounced zammel ['zm??]) is a declarative XML-based language created by Microsoft which is used as a user interface markup language to define UI elements, data binding, eventing, and other features.

Which programming language can be used to write the backend of the Silverlight application?

We can either use Visual C# or Visual Basic to code the backend of the silverlight application. Here backend means the code behind files for the Sivlerlight pages.

When you create a new project in Silverlight through Visual Studio, how many xaml files are created and what are the uses of those files?

When we create a Silverlight application from Visual Studio, two (2) xaml files are created into the Silverlight project.

They are: 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 event (this is almost similar to global.asax file in asp.net application). By default following events are created in the App.xaml.cs file.

Application_Startup Application_Exit Application_UnhandledException ReportErrorToDOM

2. MainPage.xaml or Page.xaml - This page is the default page of the Silverlight application and when the silverlight application runs this becomes the default page to appear (this page is like the default.aspx page of asp.net application)

How to change the default page of the Silverlight application?

To change the default page of Silverlight application, you need to set the RootVisual property inside the Application_Startup even of App.xaml file.

private void Application_Startup(object sender, StartupEventArgs e)

this.RootVisual = new YourPage();

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.

<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>

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.

What is the .xap file inside ClientBin folder of consuming Silverlight application?

Following is a very good FAQ about the .xap posted on asp.net page.

What does XAP mean? XAP (pronounced ZAP) is the file extension for a Silverlight-based application package (.xap). This file contains the compressed assemblies and resources of a Silverlight 2 application.

What is a .xap file? A .xap file is a Silverlight-based application package (.xap) that is generated when the Silverlight project is built.

Why is XAP important? Tools, such as Visual Studio 2008 with the Microsoft Silverlight Tools Beta 2 for Visual Studio 2008, allow you to create Silverlight applications that are heavily client based using managed code. You can use managed code, such as C# or Visual Basic, and benefit by using the tools that you are used to working with.

How does XAP work? Once you have created the .xap file (explained below), the Silverlight 2 plug-in downloads the file and runs it in a separate work space.

How do I use a .xap file? A .xap file is used to contain and transfer the assemblies and resources of a managed code application. This managed code application must be run within the Silverlight 2 browser plug-in.

Visit http://forums.asp.net/t/1277554.aspx for complete details.

What is Silverlight.js file?

Silverlight.js is a helper file which enables Web sites to create advanced Silverlight installation and instantiation experiences.

For more details visit http://code.msdn.microsoft.com/silverlightjs

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.

How to perform Event handling in silver light?.

Silverlight 1.0 uses JavaScript, while Silverlight 2.0 uses C# (managed code) for event handling. We will be describing the event model for Silverlight 2.0.

The event handlers are defined in the code-behind file that backs the XAML definition of your User Interface (UI), namely mypage.xaml.cs.

The Silverlight Event Mode

In Silverlight, there are two event cases:

Input events Non-input events.

Input Events: The browser that hosts the Silverlight plug-in handles initial input stimulus for the input events. This is because Silverlight works within the plug-in architecture of the hosting browser. From the browser, the event is sent to the Silverlight plug-in.

Then, it is raised as an event in the Silverlight Object Model.

Non-input Events: They report a state change to a particular object, for example, the state change events that report asynchronous download state or progress of actions initiated by Web Client. Some non-input events provide lifetime information of objects at a framework level.

For example the FrameworkElement.Loaded event

Some events, such as OnError, can only be handled by the Silverlight plug-in instance and exist within the HTML Document Object Model (DOM). These events need to be continually exposed and possibly handled by any script working with the plug-in instance in the DOM. Therefore; these events are not passed to the managed programming model.

What is the difference between WPF and SilverLight?

SilverLight is a browser plugin for running it on web where WPF is used for window application. Though they both make use of XAML.

What is name of Linux version of silverlight ?

NOTE: This is objective type question, Please click question title for correct answer.

What is RIA?

RIA means rich internet applications.

They are web applications with rich features.

Rich features include built in AJAX support, animations, layouts, audio and video components.

Silverlight applications are examples of RIA.

What are the differences between WPF and SilverLight ?

Both WPF ans SilverLight are the technologies used for creating applications that have a rich user interface (i.e.: Animations, Brushes,Drawings, Layouts etc).

Both use XAML for the designing and use OOPS SilverlIght 2 onwards supports OOPS

But a lot of differences exist between these two technologies

WPF:(Windows Presentation Foundation):

1)It is used mainly for the desktop applications,but its components can be used in ASP.NET web sites also. 2)It can run as standalone application(.exe's) 3)It is Windows dependant. 4)cAN be run from desktop or from the browser. 5))Can access the database directly(not in Wpf Browser applications) 6))Does not need browser plugins. 7)Use Root Tags like Window, Page,UserControl.

SilverLight: 1(Used in web site development. 2)Implemented by embedding its output in a web page using the proper components. SilverLight applications can be execvted from a desktop using the Out of Browser feature (SilverLight 3 onwards).

3)It is not Windows dependant. It can be implemented on Linux(MoonLight) and the Nokis OS Symbian. 4)cAN be run from desktop or from the browser. 5)cannot access the database directly. We have to use WCF/ Web Service. 6)Needs a browser plugin to download and execute the silverlight content in a web page. 7)Use Root Tags Like UserControl, Page.

What is SilverlLight RunTime?

It is basically a component that is responsible for downloading the .xap file from the server and help the users to see the silevelight content's olutput in a web page .xap file is basically a file that connects the silverlight functionality with .aspx page...xap file is used for referencing the SilverlIght resources on a .aspx page.

What is App.xaml?

it is a file used in WPF/SilverLight applications.

Its settings affect the different .xaml pages.

It is used for these reasons

1) Provides a startup URI in WPF or specify the startup page in SilverLight applications

2)Define event handlers like Application_Error, Application_Startup wherever needed.

3)Define global styles inside the resources tag

4)Define properties that can then be used for data passing between .xaml pages.

What is the use of the ClientBin folder?

This folder is used in the ASP.NET application that will be using the Silverlight functionality. This folder contains the .xap file that contains the references of the SilverLight Libraries which will then be used in the ASP.NET application.

Location of the ClleintBin Folder :It is below the root folder of the Web Application that is attached with the SilveLight application

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(); }

What is Silverlight?

Silverlight is a web application framework that provides functionalities similar to those in Adobe Flash, integrating multimedia, graphics, animations and interactivity into single run time environment. Its a cross-browser, cross-platform implementation of the .NET framework.

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.

Can we add the reference of class library project in silver light application project?

No, we cant 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.

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.

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.

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)

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 resize 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.

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

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.

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;

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();

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.

Give an example of creating button in XAML ?

In XAML, a button can be created as in the following example:

Example:

<Grid x:Name="LayoutRoot" Background="White">

<Button Width="60" Height="30">Click Here</Button>

</Grid>

But in Visual Studio, you can directly create a button.

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.

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.

Explain about Deep Zoom Composer in silverlight ?

The Deep Zoom feature in silverlight is performed by using deep zoom composer. For Panning and Seamless zooming, this composer will help us by creating high resolution images.

RIA means...

The full form of RIA is Rich Internet Applications. These applications comprises of animations,layouts,video and audio capability and also Ajax support. It is a library of client and server components which runs on the top of ADO .NET Data Services.

Differences between WPF and Silverlight..

The main difference between both is that, Silverlight is used mostly to develop rich web based applications, whereas WPF is used for desktop based applications. WPF was introduced in .NET 3.0 framework. Silverlight cannot support the advanced features of Windows Operating System, whereas WPF supports Windows OS such as 3D, Hardware acceleration, and full document support.

What is the role of a .xap file in silverlight ?

A .xap file is nothing but a compiled silverlight application. It contains all the necessary required files for the silverlight runtime to run the application. It is a kind of zipped file.

It contains an application manifest file (AppManifest.xaml), and all the required DLLs which are required by the application to run. An important point to note is that the .dll file has the same name as that of the application.

Explain about ClientBin folder..

The .xap file is kept in this ClientBin folder. The ClientBin folder acts as the default storage location for the .xap fie, though this .xap file can be kept anywhere.

What are the languages that are used to create silverlight based applications ?

The languages which can be used to create a silverlight application are XAML,C#,VB.NET. The XAML language is used to create shapes,controls, and texts as it is a declarative language. Also XAML is XML based and hence it has to follow XML rules.

What are the controls that comes with silverlight ?

The controls that comes with silverlight are of 3 types. They are: i) Canvas: This control will allow the positioning of the child elements according to the X,Y space. ii) Grid: This control will allow the child elements positioning in rows or columns. iii) Stack Panel: This control will llow the child elements positioning as vertically or horizontally.

How style works with Silverlight?

Style is collection of property value that apply to an element. First define the style in

App.xaml.

<Application.Resource> <Style x:key="MyButton" TargetType="Button"> <Setter Property="FontFamily" Value="Verdana" /> <Setter Property="FontSize" Value="36" /> </Style> </Application.Resource>

Apply style to Button. <Button Style="{StaticResource MyButton}" Content="My Button" ></Button>

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.

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.

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.

For Windows,what are system requirement for Silverlight?

Operating System - Windows 7, Windows Vista, Windows XP SP2. Processor - Intel Platinum III RAM - 128MB

Which platforms support Silverlight?

1. Windows XP Service Pack 2 2. Windows 2000 3. Windows Vista 4. Windows Server 2003 5. Mac OS 6. Linux Moonlight

Which browsers support Silverlight?

1. Internet Explorer 6,7,8 2. Mozilla Firefox 2,3 3. Safari 3,4 4. Google Chrome

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.

Difference between Silverlight 3 and Silverlight 4?

There are a lot of new features in Silverlight 4 that are not present in Silverlight 3 :1. Print Support 2. WebCam / Microphone Support 3. Mouse right click event handling 4. RichTextArea Control 5. Multicast network support 6. Silverlight hosting in HTML 4 7. Google Chrome support

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.

Diffrence 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.

What are the system requirements for Silverlight?

Will Silverlight work with my new or existing Windows Media services platform for streaming? Ans : Yes, in the final release. The CTP supports progressive download and playback from any server. In its final release, Silverlight will take advantage of Windows Server features for streaming

Will Silverlight support the full range of APIs offered by the Windows Media Player ActiveX control today? Ans : We are actively speaking to customers and partners about their needs

Will Silverlight support digital rights management?

Ans : For content providers, Silverlight will support digital rights management (DRM) built on the recently announced Microsoft PlayReady content access technology on Windows-based computers and Macintosh computers

Will Silverlight-based applications run in Media Center? What about Media Center Extender? Ans : Silverlight-based applications can run in Media Center but may have rendering issues on Media Center Extenders. Applications that are implemented using the Media Center SDK will provide a better experience.

Are there any new tools for creating and publishing media content with Silverlight? Ans : Yes. The recently announced Expression Media Encoder, a feature of Expression Media, will support live and on-demand encoding and template-based publishing of Silverlight-based experiences and applications. In addition, Silverlight works with the broad range of Windows Media encoding tools and utilities available today. Additional details will be made available shortly.

What video encoding formats are supported? Ans : The designer or developer is free to use any encoding format for their video supported by the Windows Media Video codec. This includes Variable Bit Rate (VBR) encoding for DVD-quality video and the use of the VC-1 codec for highdefinition content. However, for HD content, be aware that the maximum output rate from the service is 700 kilobit/s, which means the client will not receive real-time delivery of HD video

What scalability does this system deliver? What if I have a large number of visitors to my Web site at the same time? Ans : This service uses the Microsoft content delivery network specifically optimized for long-form video content. It has a provisioned global aggregate data rate in excess of 1 terabit/second.

Does this solution compete with content delivery networks (CDNs)?

Ans : No, this service uses the Microsoft CDN for the low latency delivery of media, and it does not compete with CDNs because it is specifically optimized for use with Silverlight RIAs

How is my content secured from unauthorized access? Ans : You will have to be signed into the Silverlight Streaming service to manage your account and your Silverlight applications. Your Silverlight Streaming ID and secret key, associated to your Windows Live ID, will authenticate you as the unique and legitimate owner of the applications and content you upload to the service. You will also need this information to manage your Silverlight applications using the API. The Silverlight Streaming ID is public. However, the secret key should be kept confidential.

Can Microsoft Silverlight Streaming service be used for non-video files such as music files? Ans : Yes. All valid content encoded for Silverlight applications and presented with Silverlight can be used. This includes music files such as WMA and MP3. Business logic written in JavaScript can also be stored and streamed to the client, and in the future, any Silverlight Dynamic Language Runtime assemblies can also be used. See more at: http://www.aired.in/2010/04/silverlight-interviewquestions.html#sthash.QinepZF9.dpuf

S-ar putea să vă placă și