Enhancing Data Binding
The Binding
class has a number of properties that you can use to further configure a data binding rather than simply connecting the value of the target property directly to the source property. These properties are the keys to enabling the power and flexibility of Silverlight's data binding capabilities, so let's take a look at them now.
String Formatting
Bindings have a StringFormat
property that you can use to format a bound property's value before it is passed to the target control to be consumed. This can be a very useful feature when binding to a nonstring property, such as a DateTime
or a decimal
. You can use the StringFormat
property on the binding to set the format, using the same types of formatting strings as ...
Get Pro Business Applications with Silverlight 5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.