How to: Set Data Binding Properties by Using the WPF Designer
This procedure shows you how to use the WPF Designer for Visual Studio to set properties on a data binding that connects data to a control.
To set properties on a data binding
Create a data binding by using the data binding builder. For more information, see Walkthrough: Creating a Data Binding by Using the WPF Designer.
In the Properties window, scroll to the property that has the data binding.
At the edge of the left column, click the property marker ().
A menu appears.
Tip
You can also right-click the row to display the menu.
Click Apply Data Binding.
The data binding builder appears.
Click the Options pane.
Set properties on the data binding by selecting a combination of the following settings.
Option
Description
String Format
Sets the string format. Click the down-arrow to select from a list of pre-defined formats, or enter your own format. For more information, see Formatting Types.
Mode
Sets the BindingMode value for the data binding.
UpdateSourceTrigger
Sets the UpdateSourceTrigger value for the data binding.
NotifyOnValidationError
Sets a value that indicates whether to raise the Error attached event on the bound object.
ValidatesOnDataErrors
Sets a value that indicates whether to include the DataErrorValidationRule.
ValidatesOnExceptions
Sets a value that indicates whether to include the ExceptionValidationRule.
Include TargetNullValue
Sets the value that is used in the target when the value of the source is null.
BindsDirectlyToSource
Sets a value that indicates whether to evaluate the Path relative to the data item or the DataSourceProvider object.
IsAsync
Sets a value that indicates whether the binding gets and sets values asynchronously.
NotifyOnSourceUpdated
Sets a value that indicates whether to raise the SourceUpdated event when a value is transferred from the binding target to the binding source.
NotifyOnTargetUpdated
Sets a value that indicates whether to raise the TargetUpdated event when a value is transferred from the binding source to the binding target.
See Also
Tasks
Walkthrough: Creating a Data Binding by Using the WPF Designer