Microsoft
70-511 · Question #113
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 A. 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 WrapPanel control and set its Orientation property to Horizontal.
- BPlace each control in a StackPanel control and set its Orientation property to Horizontal.
- CPlace the controls in a grid and define the rows and columns using star sizing.
- DPlace each control in a DockPanel control and set its Dock property to Left.
How the community answered
(31 responses)- A84% (26)
- B10% (3)
- C3% (1)
- D3% (1)
Community Discussion
No community discussion yet for this question.