Remarks: This can be used with the Convert() method for a binding.
Methods
Convert
#Converts the
value to the specified targetTypeRemarks: This is called when translating the value from the source to the destination, usually from the Control to the View Model.
Parameters:
| value (object) | Value to convert |
| targetType (Type) | Type to convert the value to |
| parameter (object) | Context-specific parameter passed from the binding |
| culture (CultureInfo) | Culture to convert with |
Returns: A converted value with the type of
targetType.ConvertBack
#Converts the
value to the specified targetType.Remarks: This is called when translating the value back from the destination to the source, usually from the View Model to the Control. This should be the reverse implementation of the Convert(object, Type, object, CultureInfo) method.
Parameters:
| value (object) | Value to convert |
| targetType (Type) | Type to convert the value back to |
| parameter (object) | Context-specific parameter passed from the binding |
| culture (CultureInfo) | Culture to convert with |
Returns: A converted value with the type of
targetType.