Microsoft
70-511 · Question #150
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains an ObservableCollection object named Pictures that contains several Picture…
The correct answer is D. <ListBox ItemsSource="{Binding Source={StaticResource pictures))">. See the full explanation below for the reasoning.
Question
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains an ObservableCollection object named Pictures that contains several Picture objects. Each Picture object contains the Name and PictureFilePath properties. You add a ListBox control to the application. You need to ensure that the pictures are displayed in the ListBox control. Which code fragment should you use?
Options
- A<ListBox ItemsSource="{Binding Source={StaticResource pictures}}">
- B<ListBox ItemsSource="{Binding Source={StaticResource pictures}}">
- C<ListBox ItemsSource="{Binding Source={StaticResource pictures}>">
- D<ListBox ItemsSource="{Binding Source={StaticResource pictures))">
How the community answered
(32 responses)- A9% (3)
- B3% (1)
- C16% (5)
- D72% (23)
Community Discussion
No community discussion yet for this question.