300+ [UPDATED] WPF MCQs and Answers [PDF]

Best WPF Objective Questions and Answers

WPF Objective Questions Pdf Download for Exam WPF MCQs. Quiz WPF questions are very important for campus placement test and job interviews. As per my experience good interviewers hardly plan to ask any particular question during your Job interview and these model questions are asked in the online technical test and interview of many IT companies.

1) The TextBox control shows a default context menu with options to Cut, Copy and Paste. Can we override this context menu by defining our own in the TextBox control?

A. True

B. False

Ans: A

MCQs on WPF

2) Can we store the ContextMenu in Resource so that we can reuse it for various control on a form?

A. True

B. False

Ans: A

 

3) In WPF Padding controls how much extra space gets placed around the inside edges of the element.

A. True

B. False

Ans: A

 

4) Visibility (defined on UIElement) might sound like a strange property to talk about in the context of layout, but it is indeed relevant. An element’s Visibility property actually isn’t Boolean, but rather a three-state System.Windows.Visibility enumeration. One of Its value is “Collapsed” What is the meaning of this value

A. The element is invisible yet still participates in layout.

B. The element is invisible and does not participate in layout

C. The element gets rendered and participates in layout.

D. None of the above

Ans: B

 

5) BAML can’t be decompiled back into XAML

A. True

B. False

Ans: B

 

6) the .NET Framework 4.0 introduces a handful of new features for the XAML language. This second generation of the XAML language is referred to as

A. XAML2006

B. XAML2008

C. XAML2009

D. None of these

Ans: C

 

7) FrameworkElement is derived from

A. UIElement

B. ContentControl

C. Application

D. Control

Ans: A

 

8.WPF separates the appearance of an user interface from its behavior. The appearance is generally specified in the_______.

A. HTML

B. XAML

C. XML

D. XSLT

Ans: B

 

9. Which of the following layout is not available in WPF?

A. StackPanel

B. Canvas

C. Grid

D. Table

Ans: D

 

10.x:Static and data binding markup extensions are same.True or false?

A. True

B. False

Ans: B

 

11.WPF is a replacement to DirectX.True or False?

A. True

B. False

Ans: B

 

12.which is dependency property in this code:

A. Width

B. Canvas.Left

C. Canvas

D. None of above

Ans: B

 

13. Transformations are available in which namespace?

A. System.Windows.UIElement

B. System.Windows.FrameworkElement

C. System.Windows.Media

D. None of above

Ans: C

 

14.Which tool(s)is/are used to develop WPF applications?

A. Visual Studio

B. Expression Blend

C. Both a & b

D. Only a

Ans: C

 

15.WrapPanel Class comes under___________ assembly.

A. PresentationCore

B. PresentationFramework

C. milcore

D. None of above

Ans: B

 

16. Development is more efficient because designers can implement an application’s appearance simultaneously with developers who are implementing the application’s behavior.True or false?

A. True

B. False

Ans: A

 

17.A key element of the Trustworthy Computing initiative in WPF is_______.

A. XAML

B. SDL

C. XAP

D. None of above

Ans: B

 

18.Which of the following is routing strategy of Routed events?

A. Bubbling

B. Direct

C. Tunneling

D. All of above

Ans: D

 

19. Child controls are virtualized and arranged on a single line that is either horizontally or vertically oriented. Is true about?

A. DockPanel

B. VirtualizingStackPanel

C. WrapPanel

D. StackPanel

Ans: B

 

20. Child controls are positioned in left-to-right order and wrapped to the next line when there are more controls on the current line than space allows.Is true about?

A. WrapPanel

B. StackPanel

C. VirtualizingStackPanel

D. DockPanel

Ans: A

 

21.In DockPanel Child controls are aligned to the edges of the panel.True or False?>

A. True

B. False

Ans: A

 

22.Which of the following is not WPF model(used to create a new control/custom control)?

A. User Control Model

B. Control Model

C. Framework Element Model

D. Element Model

Ans: D

 

23.One of the primary architectural philosophies used in building WPF was a preference for properties over methods or events.

A. True

B. False

Ans: A

 

24.Which of the following class is used to implement Trees in WPF?

A. LogicalTreeHelper

B. VisualTreeHelper

C. AbstractTreeHelper

D. a & b

Ans: D

 

25._______class provides the GetChildren, GetParent, and FindLogicalNode methods for logical tree traversal.

A. LogicalTreeHelper

B. VisualTreeHelper

C. AbstractTreeHelper

D. a & b

Ans:A

 

26. ________ is a DependencyProperty instance, which is obtained as a return value when registering a dependency property, and then stored as a static member of a class.

A. Dependency property

B. Dependency property identifier

C. CLR “wrapper”

D. None of above

Ans: B

 

27. Windows Presentation Foundation (WPF) introduces _______ events that can invoke handlers that exist on various listeners in the element tree of an application.

A. routed

B. bubbled

C. child

D. None of above

Ans: A

 

31.The________attribute works for FrameworkElement and FrameworkContentElement used for consistency.

A. Class

B. Name

C. Key

D. Value

Ans: B

 

32.All XAML resources should have an________attribute in WPF.

A. x:Name

B. x:Class

C. x:Value

D. x:Key

Ans: D

 

33. x:Null specifies null as a value for a property and can be used either for attributes or property element values.True or False?

A. True

B. False

Ans: A

 

34.__________provides a value for a property by deferring that value to be a run-time reference to a resource.

A. StaticResource

B. DynamicResource

C. RelativeSource

D. Binding

Ans: B

 

35.___________provides a value for a property by substituting the value of an already defined resource.

A. StaticResource

B. DynamicResource

C. RelativeSource

D. Binding

Ans: A

 

36.____________provides source information for a Binding that can navigate several possible relationships in the run-time object tree.

A. StaticResource

B. DynamicResource

C. RelativeSource

D. Binding

Ans: C

 

37._________provides a data bound value for a property, using the data context that applies to the parent object at run time.

A. StaticResource

B. DynamicResource

C. RelativeSource

D. Binding

Ans: D

 

38. What is full form of WPF?

a)Windows Presentation FoundationClass

b)Windows Precomputed FoundationClass

c)Windows Presentation Functions

d)None of These

Ans: A

 

39. What is XAML?

a)Extensible and Markup Language

b)Extensible Application Markup Language

c)Xtra Application Markup Language

d)None of These

Ans: B

 

40. Does that mean WPF has replaced DirectX?

a)Yes

b)No

Ans: B

 

41. Is XAML meant only for WPF ?

a)Yes

b)No

Ans: B

 

42. What is the stand for is XBAP?

A. extensible based application

B. XAML Browser Application

C. XAML Based Application

D. none

Ans: B

 

43. Which of the following have two states of Freezable object?

A. Fix and Unfix

B. Frozen and unfrozen.

C. Static and Dynamic

D. None

Ans: B

 

44. Which layout control would be the best choice for a user interface that requires evenly spaced controls laid out?

A. Grid

B. Canvas

C. UniformGrid

D. EvenlyGrid

Ans: C

 

45. Events Supported by WPF is are?

A. Direct Event

B. Bubbling Event

C. Tunneling Event

D. All of the above

Ans: D

 

46. WPF transformations can be used for

A. Only rotaion

B. Only scaling

C. Only skewing

D. rotation, scaling, and skewing

Ans: D

 

47. Which object can be used share the variable across pages in WPF?

A. Application

B. Session

C. Cookies

D. Viewstate

Ans: A

 

48. Which of the following is true regarding XAML?

A. Separation of designer code and logic

B. Tools like Expression Blend do not support XAML.

C. XAML is platform independent.

D. All of the above

Ans: A

 

49. How you can set a working mnemonic key for a label?

A. Set the Target property to the target control. Precede the letter for the mnemonic key with an underscore symbol in the Content property of the Label control.

B. You must place both the Label control and the Target property in the same container.

C. Set the Mnemonic Key property on the Label control.

D. None

Ans: A

 

50. In WPF which language is used to express user interface?

A. XML

B. XAML

C. WSDL

D. C#

Ans: B

Leave a Reply

Your email address will not be published. Required fields are marked *