Why do we have both TypeConverters and IValueConverter in WPF?
问题 I am new to WPF. I just don't understand why there is a need for TypeConverters and IValueConverter in WPF. The purpose of both objects is to convert a value to specific type; but why both? Thanks in advance. 回答1: IValueConverter is used only in data-binding scenarios. It allows you to format values before they are displayed in the UI or to parse values from UI controls so that they can be stored in the binding source. an example would be to convert an IsDirty flag to an "*" in the UI or a