nerdexam
Microsoft

70-511 · Question #133

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment to bind a customer object to…

The correct answer is D. Use a PresentationTraceSources object. See the full explanation below for the reasoning.

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment to bind a customer object to several controls in a window. <TextBox Text="{Binding Path=CustomerName}" Name="textBoxl" /> When the application executes, you receive the following error message:

"System.Windows.Data Error: 35:

BindingExpression path error: 'CustomerName' property not found on 'object' "Customer" (HashCode=22613453)' BindingExpression:Path=CustomerName; DataItem='Customer' (HashCode=22613453); target element is 'TextBox' (Name='textBoxl') target property is 'Text' (type 'String')" You need to identify the source of the error. What should you do?

Options

  • AUse a Trace object.
  • BUse a Debug object.
  • CUse the WPF Visualizer.
  • DUse a PresentationTraceSources object.

How the community answered

(20 responses)
  • A
    5% (1)
  • B
    5% (1)
  • C
    15% (3)
  • D
    75% (15)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice