Q#1: Which of the following is a built-in 2D transform supported by the System.Windows.Media namespace?
(A) Translate Transform
(B) Scale Transform
(C) Rotate Transform
(D) All of the above
Answer: (D) All of the above
Q#2: What will be the output of the given XML code when the element name is printed?
(A) uni
(B) Virtual
(C) University Node
(D) XmlDocument
Answer: (A) uni
Q#3: Which property is used in DockPanel to dock elements to a side?
(A) Align Property
(B) Dock Property
(C) DockPanel.Dock Property
(D) Panel.Dock Property
Answer: (C) DockPanel.Dock Property
Q#4: What should be done to delete the value of a non-empty cell?
(A) Set value to NULL
(B) Set value to string.Empty
(C) Delete the cell
(D) Reset the grid
Answer: (B) Set value to string.Empty
Q#5: Can BAML be converted back into XAML?
(A) No, it cannot be converted
(B) Yes, because BAML is a compressed representation of XAML
(C) Only partially
(D) Only with .NET compiler
Answer: (B) Yes, because BAML is a compressed representation of XAML
Q#6: What are the default values of MinHeight and MinWidth in WPF?
(A) 0
(B) 1
(C) Infinity
(D) -1
Answer: (A) 0
Q#7: Which property determines which cells are affected by resizing a GridSplitter?
(A) Alignment
(B) Orientation
(C) Layout
(D) Margin
Answer: (A) Alignment
Q#8: Which version of WPF introduced multi-touch support?
(A) WPF 2.0
(B) WPF 3.0
(C) WPF 3.5
(D) WPF 4.0
Answer: (D) WPF 4.0
Q#9: Which type of sizing means the size adjusts according to the content in WPF Grid?
(A) Absolute Sizing
(B) Auto Sizing
(C) Star Sizing
(D) Fixed Sizing
Answer: (B) Auto Sizing
Q#10: Which class is used to create an XML document in C#?
(A) XmlReader
(B) XmlWriter
(C) XmlDocument
(D) XmlNode
Answer: (C) XmlDocument
Q#11: Which of the following are types of transforms in WPF?
(A) LayoutTransform
(B) RenderTransform
(C) Both A and B
(D) None of these
Answer: (C) Both A and B
Q#12: In WPF, which control is created in C# when converting from the given XAML button code?
(A) System.Windows.Button
(B) System.Windows.Controls.Button
(C) System.Controls.Button
(D) Windows.Button
Answer: (B) System.Windows.Controls.Button
Q#13: Which class is used in C# to write data to a text file?
(A) FileReader
(B) StreamReader
(C) StreamWriter
(D) FileWriter
Answer: (C) StreamWriter
Q#14: Which panel is considered a superset of StackPanel functionality?
(A) Grid Panel
(B) Dock Panel
(C) Wrap Panel
(D) Canvas Panel
Answer: (B) Dock Panel
Q#15: XAML is mainly used for what purpose?
(A) Database management
(B) Designing user interfaces
(C) Network communication
(D) File management
Answer: (B) Designing user interfaces
Q#16: WPF Panels are derived from which class?
(A) System.Windows.Controls.Panel
(B) System.Windows.Panel
(C) System.Controls.Panel
(D) System.Windows.Framework
Answer: (A) System.Windows.Controls.Panel
Q#17: In TranslateTransform, what do the X and Y properties represent?
(A) Rotation values
(B) Horizontal and vertical movement
(C) Scaling values
(D) Alignment properties
Answer: (B) Horizontal and vertical movement
Q#18: What does Margin represent in WPF controls?
(A) Space inside the control
(B) Space outside the control
(C) Border thickness
(D) Font spacing
Answer: (B) Space outside the control
Q#19: What does ZIndex determine in WPF elements?
(A) Element size
(B) Element visibility
(C) Element layering order
(D) Element alignment
Answer: (C) Element layering order
Q#20: Why are most WPF classes inherently thread-unsafe?
(A) Because they derive from DispatcherObject
(B) Because they use XML
(C) Because they run on multiple threads
(D) Because they depend on UI controls
Answer: (A) Because they derive from DispatcherObject