单项选择题 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code segment. The TextBox control is data-bound to an instance of the Contact class. You plan to implement an ErrorTemplate in the TextBox control. You need to ensure that the validation error message is displayed next to the TextBox control. Which code fragment should you use?()
多项选择题 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code segment. (Line numbers are included for reference only.) The TextBox control is data-bound to an instance of the Contact class. You need to ensure that the Contact class contains a business rule to ensure that the ContactName property is not empty or NULL. You also need to ensure that the TextBox control validates the input data. Which two actions should you perform?()
多项选择题 You use Microsoft .NET Framework 4 to create a Windows Forms application. You add a new class named Customer to the application. You select the Customer class to create a new object data source. You add the following components to a Windows Form: A BindingSource component named customerBindingSource that is data-bound to the Customer object data source. A set of TextBox controls to display and edit the Customer object properties. Each TextBox control is data-bound to a property of the customerBindingSource component. An ErrorProvider component named errorProvider that validates the input values for each TextBox control. You need to ensure that the input data for each TextBox control is automatically validated by using the ErrorProvider component. Which two actions should you perform?()