‘StringToVisibilityConverter’ does not implement interface member
‘System.Windows.Data.IValueConverter.Convert(object, System.Type,
object, System.Globalization.CultureInfo)’
Any idea what’s wrong with this? As far as I know my imports are correct
public class StringToVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType,
object parameter, CultureInfo culture)
{
if (value != null && value is string)
{
var input = (string)value;
if (string.IsNullOrEmpty("Name"))
{
return Visibility.Collapsed;
}
else
{
return Visibility.Visible;
}
}
return Visibility.Visible;
}
Yup, you also need to have this method when you inherit IValueConverter: