How to: Set Data Binding Properties by Using the Silverlight Designer
Microsoft Silverlight will reach end of support after October 2021. Learn more.
This procedure shows you how to use the Silverlight Designer for Visual Studio 2010 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 Silverlight 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 () or inheritance 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 for the binding display value. 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 Mode property to indicate the BindingMode to use.
UpdateSourceTrigger
Sets the UpdateSourceTrigger property to indicate when the target value updates the source.
NotifyOnValidationError
Sets the NotifyOnValidationError property to indicate whether errors should raise the BindingValidationError event on the bound object.
ValidatesOnDataErrors
Sets the ValidatesOnDataErrors property to indicate whether to report IDataErrorInfo validation errors in the user interface.
ValidatesOnExceptions
Sets the ValidatesOnExceptions property to indicate whether to report exception-based validation errors in the user interface. If you select both Validatates on DataErrors and ValidatesOnExceptions, then an exception-based error will replace any IDataErrorInfo-based error in the error report.
ValidatesOnNotifyDataErrors
Sets the ValidatesOnNotifyDataErrors property to indicate whether to report INotifyDataErrorInfo validation errors in the user interface.
Include TargetNullValue
Sets the TargetNullValue property to indicate the value to use in the target when the value of the source is null.
BindsDirectlyToSource
Sets the BindsDirectlyToSource property to indicate whether to ignore any ICollectionView settings on the data source.
See Also