Microsoft
70-511 · Question #234
You are developing a Windows Presentation Foundation (WPF) application. The application's main window lists a series of controls horizontally until a control reaches the edge of the window. At that…
The correct answer is D. Place each control in a WrapPanel control and set its Orientation property to Horizontal. See the full explanation below for the reasoning.
Question
You are developing a Windows Presentation Foundation (WPF) application. The application's main window lists a series of controls horizontally until a control reaches the edge of the window. At that point, the series of controls continues on a new line. You need to ensure that this layout persists when the user changes the size of the window. What should you do?
Options
- APlace each control in a DockPanel control and set its Dock property to Left.
- BPlace the controls in a grid and define the rows and columns using star sizing.
- CPlace each control in a StackPanel control and set its Orientation property to Horizontal.
- DPlace each control in a WrapPanel control and set its Orientation property to Horizontal.
How the community answered
(54 responses)- A6% (3)
- B4% (2)
- C11% (6)
- D80% (43)
Community Discussion
No community discussion yet for this question.