/// <summary> /// Convert a string to a visibility /// </summary> /// <param name="value">value to convert</param> /// <param name="targetType">not used</param> /// <param name="parameter">not used</param> /// <param name="culture">not used</param> /// <returns>visibility value</returns> public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value == null || value.GetType() != typeof(string)) { return(this.NotVisibile()); } string check = (string)value; if (StringCompare.CompareEmpty(this.AssessmentString)) { return(StringCompare.CompareNullOrEmpty(check) ? this.NotVisibile() : Visibility.Visible); } return(StringCompare.SimpleCompare(check, AssessmentString) ? this.NotVisibile() : Visibility.Visible); }