Skip to main content

Visual Programming MCQs with Answers

Practice important Visual Programming MCQs with answers and explanations.

Chapter: 18
Q381:
What does the ScaleTransform property Scalex control?
A. Horizontal scaling factor
B. Vertical scaling factor
C. Scaling origin
D. Scaling matrix
Correct Answer: A
Chapter: 18
Q382:
Which transform is used to skew an element horizontally in WPF?
A. SkewTransform
B. RotateTransform
C. ScaleTransform
D. TranslateTransform
Correct Answer: A
Chapter: 18
Q383:
How do you specify a matrix transform using a string in XAML?
A. MatrixTransform with matrix as a string
B. MatrixTransform with a Matrix object
C. TransformGroup with a MatrixTransform
D. MatrixTransform with a Transform
Correct Answer: A
Chapter: 18
Q384:
What is the effect of setting RenderTransformOrigin to 0.5, 0.5?
A. It centers the transform origin at the element's center.
B. It positions the transform origin at the element's top-left corner.
C. It scales the element to 50% of its size.
D. It applies a fixed transformation from the top-right corner.
Correct Answer: A
Chapter: 18
Q385:
What does the TranslateTransform property X specify?
A. Amount to move horizontally
B. Amount to move vertically
C. Amount to scale horizontally
D. Amount to scale vertically
Correct Answer: A
Chapter: 18
Q386:
Which transform affects the actual size and layout of elements in WPF?
A. LayoutTransform
B. RenderTransform
C. TranslateTransform
D. ScaleTransform
Correct Answer: A
Chapter: 18
Q387:
How are multiple transforms combined in WPF?
A. Using TransformGroup
B. Using MatrixTransform
C. By chaining multiple Transform properties
D. Using RenderTransformGroup
Correct Answer: A
Chapter: 18
Q388:
What does the Canvas.ZIndex property control?
A. The stacking order of elements in a Canvas.
B. The size of elements within a Canvas.
C. The position of elements in a Canvas.
D. The margin and padding of elements in a Canvas.
Correct Answer: A
Chapter: 18
Q389:
What does the WrapPanel do when there is not enough space for elements?
A. Wraps elements into additional rows or columns.
B. Stretches elements to fit available space.
C. Centers elements within the available space.
D. Positions elements according to a grid layout.
Correct Answer: A
Chapter: 18
Q390:
Which panel is most suitable for absolute positioning of elements in WPF?
A. Canvas
B. StackPanel
C. WrapPanel
D. Grid
Correct Answer: A
Chapter: 18
Q391:
What property does StackPanel use to determine the orientation of its children?
A. Orientation
B. FlowDirection
C. Alignment
D. Direction
Correct Answer: A
Chapter: 18
Q392:
Which panel is designed to handle content overflow and layout based on available space?
A. WrapPanel
B. Canvas
C. StackPanel
D. Grid
Correct Answer: A
Chapter: 18
Q393:
In a StackPanel, how does Orientation affect layout?
A. It determines whether elements are stacked horizontally or vertically.
B. It sets the margin for each element.
C. It determines the alignment of elements.
D. It sets the size of each element.
Correct Answer: A
Chapter: 18
Q394:
What does the VirtualizingStackPanel help with in WPF?
A. Saves space for offscreen content in data binding scenarios.
B. Provides a grid layout for items.
C. Manages the alignment of items within a panel.
D. Controls the size of individual items in a panel.
Correct Answer: A
Chapter: 19
Q395:
What does the DockPanel's Dock attached property do?
A. Positions an element on a specific side of the panel.
B. Sets the alignment of an element within the panel.
C. Defines the size of an element.
D. Determines the z-order of overlapping elements.
Correct Answer: A
Chapter: 19
Q396:
What happens if LastChildFill is set to false in a DockPanel?
A. The last child will not fill the remaining space.
B. The last child will fill the remaining space.
C. The last child will be positioned at the bottom of the panel.
D. The last child will be centered in the panel.
Correct Answer: A
Chapter: 19
Q397:
How does HorizontalAlignment affect a button in a DockPanel?
A. It controls the button’s alignment horizontally within its docked area.
B. It sets the button’s position relative to the DockPanel's sides.
C. It affects the vertical stretching of the button.
D. It determines the z-order of the button within the DockPanel.
Correct Answer: A
Chapter: 19
Q398:
What is the purpose of Grid.Row and Grid.Column attached properties?
A. They specify the row and column in which an element should be placed within a Grid.
B. They set the row and column sizes within the Grid.
C. They align an element within a row or column.
D. They define the padding for elements within a Grid.
Correct Answer: A
Chapter: 19
Q399:
What does setting ShowGridLines to True do in a Grid?
A. It displays the grid lines for visual layout purposes.
B. It hides the grid lines for a cleaner appearance.
C. It sets the width and height of grid cells.
D. It scales the grid to fit its container.
Correct Answer: A
Chapter: 19
Q400:
What are the three types of sizing for rows and columns in a Grid?
A. Absolute, Auto, Proportional
B. Fixed, Flexible, Dynamic
C. Static, Variable, Adaptive
D. Relative, Fixed, Variable
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Visual Programming

🚀 Start Quiz Now