Conversion
Binding.StringFormat [SF]
- Use
Binding.StringFormat
for formatting source data for display when the target dependency property is of type string
Converter [C]
- Use
IValueConverter
for single binding source. - Use
IMultiValueConverter
for multiple binding sources. - Instantiate in the
Resources
section. Use withStaticResource
. Convert()
from source to target andConvertBack()
for otherwise.- Use
Binding.ConverterParameter
for parameter to methods. - If both
[SF]
and[C]
are used,[SF]
is applied after[C]
for target update.
Get MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF 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.