public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var str = value as string; var par = 0; var pars = parameter as string; if (pars != null) { par = pars.TryInt(); } return(ContentBase.GetResourcePath(str, par)); }
public object Convert(object[] value, Type targetType, object parameter, CultureInfo culture) { var strings = value.OfType <string>(); var image = strings.FirstOrDefault(x => x != null); var par = 0; var pars = parameter as string; if (pars != null) { par = pars.TryInt(); } return(ContentBase.GetResourcePath(image, par)); }