Visual Programming MCQs with Answers
Practice important Visual Programming MCQs with answers and explanations.
Multiple Choice Questions
Q411: How does SharedSizeGroup affect the sizing of columns in a Grid?
- A: It ensures that columns with the same SharedSizeGroup remain the same width when resized.
- B: It makes all columns in the grid have the same width regardless of content.
- C: It automatically adjusts the row heights based on content.
- D: It hides the grid lines of columns in the shared size group.
View Answer
A
Q412: What does the isSharedSizeScope attribute do in a Grid?
- A: It allows size groups to be shared across multiple grids within the same parent.
- B: It specifies the alignment of elements within a Grid.
- C: It controls whether a grid will have a scroll bar.
- D: It sets the width of the columns to be equal across all grids.
View Answer
A
Q413: How is clipping different from trimming in WPF?
- A: Clipping cuts off parts of the UI element that exceed its bounds, while trimming intelligently handles text overflow.
- B: Clipping hides all parts of the UI element, while trimming only affects the edges.
- C: Clipping scales the UI element, while trimming adjusts its alignment.
- D: Clipping changes the color of the UI element, while trimming changes its size.
View Answer
A
Q414: Which property determines whether a ScrollViewer displays vertical or horizontal scroll bars?
- A: VerticalScrollBarVisibility and HorizontalScrollBarVisibility
- B: ScrollBarVisibility
- C: ScrollViewerVisibility
- D: Visibility
View Answer
A
Q415: What does the Viewbox control do in WPF?
- A: It scales its single child element to fit the available space according to the specified stretch options.
- B: It allows scrolling within a specific area of the view.
- C: It provides a clipping area for UI elements.
- D: It arranges child elements in a wrap layout.
View Answer
A
Q416: What is the default stretch mode of a Viewbox?
- A: Uniform
- B: Fill
- C: None
- D: UniformToFill
View Answer
A
Q417: What does the StretchDirection property of a Viewbox control?
- A: It specifies whether the scaling should affect width only, height only, or both dimensions.
- B: It determines the alignment of the Viewbox within its parent.
- C: It sets the margin around the Viewbox.
- D: It defines the opacity of the Viewbox.
View Answer
A
Q418: How does the GridLength property in XAML affect the size of columns or rows?
- A: It specifies the size in absolute units, auto-sizing, or proportional space.
- B: It only sets the size of columns, not rows.
- C: It automatically adjusts the size based on the content.
- D: It only affects the padding of the grid cells.
View Answer
A
Q419: In a Grid, what does setting Width="Auto" do when using GridLength?
- A: It adjusts the width of the column to fit the content inside.
- B: It makes the column width equal to the total width of the grid.
- C: It sets a fixed width for the column.
- D: It makes the column width proportional to the grid size.
View Answer
A
Q420: What effect does setting ClipToBounds to False have on a Canvas?
- A: It allows drawing outside the bounds of the canvas.
- B: It restricts drawing within the bounds of the canvas.
- C: It sets the size of the canvas to the bounds of its parent.
- D: It hides the canvas itself from view.
View Answer
A