0
如何在設計時關閉自定義IValueConverter
?基本上我想這樣寫:如何在設計時關閉自定義IValueConverter?
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