试题详情
- 单项选择题 You use Microsoft Visual Studio 2010 and Microsoft . NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You create a WPF window in the application. You add the following code segment to the application. public class ViewModel { public CollectionView Data { get; set; } } public class BusinessObject { public string Name { get; set; } } The DataContext property of the window is set to an instance of the ViewModel class. The Data property of the ViewModel instance is initialized with a collection of BusinessObject objects. You add a TextBox control to the Window. You need to bind the Text property of the TextBox control to the Name property of the current item of the CollectionView of the DataContext object. You also need to ensure that when a binding error occurs, the Text property of the TextBox control is set to N/A . Which binding expression should you use?()
A、 { Binding Path=Data/Name, FallbackValue='N/A' }
B、 { Binding Path=Data.Name, FallbackValue='N/A' }
C、 { Binding Path=Data/Name, TargetNullValue='N/A' }
D、 { Binding Path=Data.Name, TargetNullValue='N/A' }
- A
关注下方微信公众号,在线模考后查看
热门试题
- You are developing a
- You are
- 您在运行 Windows
- Your company&e
- 你打算从SQL Server
- Your company&e
- Company.com ne
- 你是TestKing网站的电脑管理员,所
- You need
- 你需要为所有的胜地场所设计无线网络安全策
- 你配置一个采用默认设置全新安装的SQL&
- Certkiller.com 有一个名
- 你计划通过Windows 7
- 你正在建立一个 Web 站点。这个 We
- You have
- You use Microsoft .
- This question is the
- You are
- Your network&e
- YouaredevelopingaWin