问题
When creating WPF user controls I often find myself creating small converter classes when binding values.
Often you need to do similar conversions, and it made me wonder whether I might be missing some existing available implementations.
- Does the .NET library contain any implementations of IValueConverter or IMultiValueConverter?
- Has there been any attempt made to create a library of reusable value converters?
回答1:
There are not many built-in, public are:
- BooleanToVisibilityConverter
- AlternationConverter
- ZoomPercentageConverter
- JournalEntryListConverter
May have missed some...
来源:https://stackoverflow.com/questions/9560329/does-wpf-have-a-set-of-default-binding-converters-available