How do I turn off a custom IValueConverter at design time?
- by Jonathan Allen
How do I turn off a custom IValueConverter at design time? Basically I want to write this:
Public Class MethodBinder
Implements IValueConverter
Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.Convert
If [DESIGN_TIME] Then Return Nothing
If value IsNot Nothing Then Return CallByName(value, CStr(parameter), CallType.Method)
Return Nothing
End Function
Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotSupportedException
End Function
End Class