nerdexam
Microsoft

70-518 · Question #243

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You add a ListBox control to the application. The ListBox control is data-bound to an instance of a…

The correct answer is D. Extend the ObservableCollection<Product> class in the ProductList class. See the full explanation below for the reasoning.

Question

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You add a ListBox control to the application. The ListBox control is data-bound to an instance of a custom collection class of the Product objects named ProductList. You need to ensure that changes to ProductList are automatically reflected in the ListBox control. What should you do?

Options

  • AImplement the INotifyPropertyChanged interface in the Product class.
  • BImplement the IQueryable<Product> interface in the ProductList class.
  • CExtend the DependencyObject class in the Product class.
  • DExtend the ObservableCollection<Product> class in the ProductList class.

How the community answered

(37 responses)
  • A
    3% (1)
  • B
    8% (3)
  • C
    11% (4)
  • D
    78% (29)

Community Discussion

No community discussion yet for this question.

Full 70-518 Practice