70-511 · Question #32
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' "Customer1 (HashCode=22613453). BindingExpression:Path=CustomerNarne; 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
(52 responses)- A4% (2)
- B15% (8)
- C8% (4)
- D73% (38)
Community Discussion
No community discussion yet for this question.