×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Silverlight MCQs (Multiple-Choice Questions)

Practice these Silverlight MCQs (Multiple-Choice Questions) with answers and explanations to test your knowledge of Microsoft Silverlight, XAML, controls, layouts, data binding, dependency properties, animations, media, navigation, networking, and application development.

Silverlight MCQs

These Silverlight multiple-choice questions cover important concepts of the Silverlight framework, including XAML, C#, controls, panels, dependency properties, data binding, styles, templates, animations, media, navigation, isolated storage, and application deployment.

List of Silverlight MCQs

The following Silverlight MCQs are useful for students, developers, and candidates preparing for technical interviews, examinations, and assessments related to Silverlight application development.

1. What is Microsoft Silverlight?

  1. A framework for building rich internet applications
  2. A relational database system
  3. An operating system
  4. A web server

Answer: A) A framework for building rich internet applications

Explanation:

Silverlight was Microsoft's framework for developing rich internet applications with features such as XAML-based UI, media, animation, graphics, and managed code.

2. Which markup language is primarily used to define the user interface of a Silverlight application?

  1. HTML
  2. XAML
  3. XML Schema
  4. JSON

Answer: B) XAML

Explanation:

XAML, or Extensible Application Markup Language, is used to declaratively define Silverlight user interfaces, controls, layouts, styles, and other UI elements.

3. Which programming language was commonly used for Silverlight application logic?

  1. C#
  2. SQL
  3. PHP
  4. Perl

Answer: A) C#

Explanation:

C# was one of the primary languages used to implement Silverlight application logic. Silverlight also supported other .NET languages.

4. What is the purpose of a Silverlight .xap file?

  1. To package the Silverlight application for deployment
  2. To store only HTML source code
  3. To store a SQL Server database
  4. To define CSS styles

Answer: A) To package the Silverlight application for deployment

Explanation:

A Silverlight application was commonly packaged into a .xap file containing the application assemblies and resources required by the application.

5. Which file commonly contains the initial XAML UI definition of a Silverlight application?

  1. App.xaml
  2. index.sql
  3. web.config
  4. style.css

Answer: A) App.xaml

Explanation:

App.xaml defines application-level XAML resources and application configuration. Individual pages commonly have their own XAML files.

6. Which class represents the main application object in a Silverlight application?

  1. Application
  2. Window
  3. Browser
  4. SilverlightHost

Answer: A) Application

Explanation:

The Silverlight application class derives from Application and provides application-level behavior and resources.

7. Which event is commonly used when a Silverlight application starts?

  1. Application.Startup
  2. Application.Begin
  3. Application.Load
  4. Application.InitializePage

Answer: A) Application.Startup

Explanation:

The Startup event is raised when the Silverlight application starts.

8. Which Silverlight control is commonly used to display non-editable text?

  1. TextBlock
  2. TextBox
  3. LabelBox
  4. StaticText

Answer: A) TextBlock

Explanation:

TextBlock is commonly used to display text in a Silverlight UI, whereas TextBox is designed for user input.

9. Which Silverlight control allows users to enter or edit text?

  1. TextBox
  2. TextBlock
  3. TextLabel
  4. TextView

Answer: A) TextBox

Explanation:

TextBox provides an editable text input area for Silverlight applications.

10. Which event of a Silverlight Button is commonly handled when the user clicks it?

  1. Click
  2. Pressed
  3. Execute
  4. Selected

Answer: A) Click

Explanation:

The Click event is raised when a Silverlight Button is activated by the user.

11. Which panel arranges Silverlight child elements in rows and columns?

  1. Grid
  2. Canvas
  3. StackPanel
  4. Border

Answer: A) Grid

Explanation:

The Grid panel arranges child elements using rows and columns.

12. Which panel arranges child elements horizontally or vertically in a single line?

  1. StackPanel
  2. Canvas
  3. Grid
  4. Border

Answer: A) StackPanel

Explanation:

StackPanel arranges its children sequentially in either a vertical or horizontal orientation.

13. Which Silverlight panel provides coordinate-based positioning of child elements?

  1. Canvas
  2. Grid
  3. StackPanel
  4. WrapPanel

Answer: A) Canvas

Explanation:

Canvas allows children to be positioned using attached properties such as Canvas.Left and Canvas.Top.

14. Which attached property specifies the horizontal position of an element inside a Canvas?

  1. Canvas.Left
  2. Canvas.Horizontal
  3. Canvas.X
  4. Canvas.PositionX

Answer: A) Canvas.Left

Explanation:

The Canvas.Left attached property specifies the horizontal position of a child element relative to its Canvas.

15. Which attached property specifies the vertical position of an element inside a Canvas?

  1. Canvas.Top
  2. Canvas.Vertical
  3. Canvas.Y
  4. Canvas.PositionY

Answer: A) Canvas.Top

Explanation:

The Canvas.Top attached property specifies the vertical position of a child element inside a Canvas.

16. What is a dependency property in Silverlight?

  1. A property supported by Silverlight's property system
  2. A database property
  3. A CSS property
  4. A server-side configuration value

Answer: A) A property supported by Silverlight's property system

Explanation:

Silverlight dependency properties participate in the framework's property system and support capabilities such as data binding, animation, styles, and property change notification.

17. Which base class provides the infrastructure for Silverlight dependency properties?

  1. DependencyObject
  2. DependencyProperty
  3. FrameworkProperty
  4. PropertyObject

Answer: A) DependencyObject

Explanation:

Silverlight dependency properties are associated with objects derived from DependencyObject. The DependencyProperty type represents the registered property identifier.

18. Which method is used to register a custom dependency property?

  1. DependencyProperty.Register
  2. DependencyProperty.Create
  3. Property.RegisterDependency
  4. Register.DependencyProperty

Answer: A) DependencyProperty.Register

Explanation:

A custom dependency property is registered using the static Register method of DependencyProperty.

19. What is the conventional name of the static field that stores a dependency property identifier?

  1. PropertyNameProperty
  2. DependencyPropertyName
  3. PropertyIdentifier
  4. RegisteredProperty

Answer: A) PropertyNameProperty

Explanation:

By convention, a dependency property identifier field is named after the property followed by the suffix Property, such as TextProperty.

20. Which Silverlight feature allows a UI property to obtain its value from a data object?

  1. Data binding
  2. CSS inheritance
  3. SQL binding
  4. HTML parsing

Answer: A) Data binding

Explanation:

Data binding connects a target dependency property of a UI element with a data source so that values can be transferred between them.

21. Which property is commonly used to provide an inherited data source for child elements in Silverlight?

  1. DataContext
  2. DataSourceContext
  3. BindingContext
  4. SourceContext

Answer: A) DataContext

Explanation:

DataContext can be set on a parent element and inherited by child elements for data binding.

22. Which property of the Binding class specifies the property path on the source object?

  1. Path
  2. SourcePath
  3. PropertyName
  4. DataPath

Answer: A) Path

Explanation:

The Path property specifies the property or subproperty on the data source to which the binding refers.

23. Which Binding property explicitly specifies the object from which data should be obtained?

  1. Source
  2. DataObject
  3. Provider
  4. Origin

Answer: A) Source

Explanation:

The Source property explicitly identifies the object that provides data for a binding. If it is not specified, the binding can use the applicable DataContext.

24. Which interface is commonly used by a Silverlight data source to notify the binding system about property changes?

  1. INotifyPropertyChanged
  2. IPropertyChanged
  3. INotifyDataChanged
  4. IDataProperty

Answer: A) INotifyPropertyChanged

Explanation:

INotifyPropertyChanged allows a data source to notify the binding system when a property value changes.

25. Which Silverlight feature allows controls to share predefined property settings?

  1. Styles
  2. Sessions
  3. Triggers only
  4. Routes

Answer: A) Styles

Explanation:

Styles provide reusable property settings that can be applied to multiple controls or elements.

26. Which XAML element is commonly used to define reusable resources such as styles?

  1. Resources
  2. StylesOnly
  3. Definitions
  4. SharedObjects

Answer: A) Resources

Explanation:

Resource dictionaries can contain reusable objects such as styles, brushes, and other resources.

27. Which Silverlight feature is used to change the visual appearance or behavior of a control?

  1. ControlTemplate
  2. DataTable
  3. HttpHandler
  4. AssemblyInfo

Answer: A) ControlTemplate

Explanation:

A ControlTemplate defines the visual structure and behavior of a control's presentation.

28. Which Silverlight class is used as a base for controls that display content?

  1. ContentControl
  2. ContentWindow
  3. ContentPanel
  4. ContentHost

Answer: A) ContentControl

Explanation:

ContentControl is a control base class for controls whose primary purpose is to display content.

29. Which Silverlight class is commonly used as the root container for a page?

  1. UserControl
  2. PageHost
  3. WindowControl
  4. RootPage

Answer: A) UserControl

Explanation:

A Silverlight XAML page commonly derives from UserControl, providing a reusable container for the page's visual tree.

30. Which Silverlight control is commonly used to display a collection of selectable items?

  1. ListBox
  2. TextBlock
  3. Border
  4. Canvas

Answer: A) ListBox

Explanation:

ListBox displays a collection of items and allows users to select items from the collection.

31. Which Silverlight control is designed to allow selection from a drop-down list?

  1. ComboBox
  2. DropDownPanel
  3. SelectBox
  4. ChoiceList

Answer: A) ComboBox

Explanation:

ComboBox provides a drop-down interface for selecting an item from a collection.

32. Which class is used to define a sequence of animation operations in Silverlight?

  1. Storyboard
  2. AnimationSequence
  3. TimelineGroup
  4. MotionController

Answer: A) Storyboard

Explanation:

A Storyboard controls and coordinates animations over time in Silverlight.

33. Which animation changes a numerical property from one value to another over time?

  1. DoubleAnimation
  2. NumberAnimation
  3. ValueAnimation
  4. NumericTransition

Answer: A) DoubleAnimation

Explanation:

DoubleAnimation animates a property whose value is represented by a double-precision floating-point number.

34. Which animation is used to animate a color value in Silverlight?

  1. ColorAnimation
  2. BrushAnimation
  3. RGBAnimation
  4. ColorTransition

Answer: A) ColorAnimation

Explanation:

ColorAnimation interpolates between color values during an animation.

35. Which Silverlight element can be used to play audio or video media?

  1. MediaElement
  2. MediaPlayerControl
  3. VideoElement
  4. AudioElement

Answer: A) MediaElement

Explanation:

MediaElement provides media playback capabilities in Silverlight applications.

36. Which method is commonly used to start playback of a Silverlight MediaElement?

  1. Play()
  2. StartMedia()
  3. BeginPlay()
  4. Run()

Answer: A) Play()

Explanation:

The Play() method starts playback of media loaded by a MediaElement.

37. Which Silverlight class was used for navigating between application pages?

  1. NavigationService
  2. PageRouter
  3. NavigationManager
  4. RouteController

Answer: A) NavigationService

Explanation:

Silverlight navigation applications used NavigationService to navigate between pages and manage navigation-related operations.

38. Which method is commonly used to navigate to another URI using Silverlight navigation?

  1. Navigate()
  2. GoTo()
  3. OpenPage()
  4. Route()

Answer: A) Navigate()

Explanation:

The Navigate() method was used by Silverlight navigation services to navigate to a specified URI.

39. Which Silverlight feature provides isolated client-side storage for application data?

  1. Isolated Storage
  2. Shared Storage
  3. Browser Registry
  4. Local SQL Server

Answer: A) Isolated Storage

Explanation:

Silverlight applications could use isolated storage to persist application-specific data in a storage area separated from other applications.

40. Which namespace contains the Silverlight isolated storage classes?

  1. System.IO.IsolatedStorage
  2. System.Storage.Silverlight
  3. System.Web.Storage
  4. Microsoft.Silverlight.Storage

Answer: A) System.IO.IsolatedStorage

Explanation:

Silverlight isolated storage APIs were provided through the System.IO.IsolatedStorage namespace.

41. Which class represents an isolated storage area for an application?

  1. IsolatedStorageFile
  2. StorageFile
  3. ApplicationStorage
  4. LocalStorageFile

Answer: A) IsolatedStorageFile

Explanation:

IsolatedStorageFile provides access to an application's isolated file storage.

42. Which Silverlight feature was commonly used to communicate with web services asynchronously?

  1. WebClient or HTTP-based asynchronous APIs
  2. Direct SQL connections from the browser
  3. Windows Registry APIs
  4. Direct server memory access

Answer: A) WebClient or HTTP-based asynchronous APIs

Explanation:

Silverlight applications used asynchronous networking APIs such as WebClient and related HTTP mechanisms to communicate with remote services.

43. Why were asynchronous operations important in Silverlight applications?

  1. To avoid blocking the UI while waiting for network operations
  2. To compile XAML faster
  3. To increase the size of a XAP file
  4. To disable event handling

Answer: A) To avoid blocking the UI while waiting for network operations

Explanation:

Network and other long-running operations should be performed asynchronously so the application's UI remains responsive while the operation is in progress.

44. Which Silverlight feature provides a way to expose application commands and navigation behavior through browser integration?

  1. Deep linking
  2. Dependency injection
  3. SQL linking
  4. Assembly linking

Answer: A) Deep linking

Explanation:

Deep linking allowed a specific location or page within a Silverlight navigation application to be represented by a URL, making it possible to navigate directly to that location.

45. Which Silverlight feature allows controls to react to different visual states?

  1. VisualStateManager
  2. VisualController
  3. StateManagerService
  4. ControlStateEngine

Answer: A) VisualStateManager

Explanation:

VisualStateManager provides a mechanism for defining and transitioning between visual states of controls.

46. Which Silverlight concept allows the same UI control to have different visual appearances through templates?

  1. Control templating
  2. Database mapping
  3. Assembly loading
  4. Service routing

Answer: A) Control templating

Explanation:

Control templates separate the visual representation of a control from its functional behavior, allowing controls to be given customized appearances.

47. Which Silverlight element is commonly used to define a reusable resource dictionary at the application level?

  1. Application.Resources
  2. Application.DictionaryOnly
  3. Application.StylesOnly
  4. Application.Shared

Answer: A) Application.Resources

Explanation:

Application.Resources can contain resources that are available throughout the Silverlight application.

48. What does the following Silverlight XAML binding specify?

<TextBlock Text="{Binding Name}" />
  1. TextBlock.Text is bound to the Name property of the applicable data source
  2. The TextBlock creates a new property named Name
  3. The TextBlock changes the application's URL to Name
  4. The TextBlock disables data binding

Answer: A) TextBlock.Text is bound to the Name property of the applicable data source

Explanation:

The binding expression uses Name as its property path. The binding engine obtains that property from the applicable source, commonly through the element's DataContext.

49. What is the main purpose of the following Silverlight XAML code?

<Canvas>
    <Rectangle Width="100"
               Height="50"
               Canvas.Left="20"
               Canvas.Top="30" />
</Canvas>
  1. It positions a rectangle at coordinates within a Canvas
  2. It creates a data-bound rectangle
  3. It defines a Grid with two rows
  4. It creates a media player

Answer: A) It positions a rectangle at coordinates within a Canvas

Explanation:

The Rectangle is a child of a Canvas, and Canvas.Left and Canvas.Top specify its position relative to the Canvas.

50. A Silverlight application needs to display a customer's name from a C# object and automatically reflect changes when the object's Name property changes. Which approach is appropriate?

  1. Bind the TextBlock to Name and have the data object implement INotifyPropertyChanged
  2. Store the Name value only in a CSS file
  3. Use Canvas.Left to update the customer's name
  4. Place the Name value inside the XAP file and never update it

Answer: A) Bind the TextBlock to Name and have the data object implement INotifyPropertyChanged

Explanation:

A binding can connect the TextBlock's Text property to the object's Name property, while INotifyPropertyChanged allows the object to notify the binding system when Name changes. This enables the UI to receive property-change notifications without manually resetting the TextBlock value each time.

Advertisement
Advertisement

Comments and Discussions!

Load comments ↻


Advertisement
Advertisement
Advertisement

Copyright © 2026 www.includehelp.com. All rights reserved.