Created
February 20, 2020 12:20
-
-
Save grimorde/7711ccfb3281fe0b58dca7752b509c9b to your computer and use it in GitHub Desktop.
String Has Value Converter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StringHasValueConverter : IValueConverter | |
{ | |
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | |
{ | |
if (value == null) return false; | |
return !string.IsNullOrEmpty(value.ToString()); | |
} | |
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | |
{ | |
throw new NotImplementedException(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment