Tuesday, March 10, 2009

silverlight interview questions

1) Is ADO.NET / Database objects supported in Silverlight Project?

ANS : No, It doesn't support normal ADO.NET / Database objects like DataTable, DataSet, DataColumn, Database connection providers like SqlConnection, OledbConnection objects.

So we have to use System.Data namespace but that contains Services related stuffs not ADO.NET/Databse Operations.

2) How can style elements properties applied in silverligh? (similar to a CSS file/skins)

ANS: 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.
For Example:

App.xaml:

'resource'

'x:key="myborder" targettype="Border"

property="width" value="5"'

'/style>' '/resource'

Page.xaml:

'Border Style="{StaticResource MyBorder}">'
...
'/Border>'


3) Can you provide a list of Layout Management Panels and when you will use them And which one is ByDefault coming while creating a silverlight web application?

ANS: There are Three panels basically :

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 .


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

ANS:
No, we can not use normal projects (class library) reference into Silverlight project. We can only add reference of other Silverlight prjoects.







1 comment:

Anonymous said...

hi this is nice article