O'Reilly logo

Mastering LOB Development for Silverlight 5: A Case Study in Action by Rocío Serrano, Braulio Díez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Converters

Most of the time, when data is shown to the user, there are aspects or values, which are not clear or intuitive enough for them. A way to solve this problem is by changing the format or making a conversion before binding. To do so, Silverlight offers an interface which allows us to perform this action.

Note

If you need to make simple formatting (for example, displaying a Date or Time), StringFormat can be directly used on the XAML (this was introduced in Silverlight 4). For more information, please visit http://bit.ly/jMBtDp.

IValueConverter

When this interface is implemented, we obtain the following functions:

  • Convert: This function prepares the data, obtained from the DataSource, to display it in the view.
  • ConvertBack: This one is in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required