“StringToVisibilityConverter”未实现接口成员“System.Windows.Data.IValueConverter.Convert(object, System.Type, object, System.Globalization.CultureInfo)”
知道这有什么问题吗?据我所知,我的进口是正确的
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;
}