Last active
August 29, 2015 13:58
-
-
Save davunderscorei/10140594 to your computer and use it in GitHub Desktop.
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 object Convert(object value, Type targetType, object parameter, CultureInfo culture, bool convertBack = false) | |
{ | |
if (Converters.Count == 0 && value != null && value.GetType() == targetType) | |
{ | |
return value; | |
} | |
foreach (IValueConverter converter in Converters) | |
{ | |
object temp = converter.Convert(value, targetType, parameter, culture, convertBack); | |
if (temp != null) | |
{ | |
return temp; | |
} | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment