public override object ConvertBack(object v, Type t, object p, CultureInfo c) { var result_1 = Second?.ConvertBack(v, t, p, c) ?? v; var result_2 = First?.ConvertBack(result_1, t, p, c) ?? result_1; return(result_2); }
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { object temp = Second.ConvertBack(value, null, null, culture); object result = First.ConvertBack(temp, targetType, null, culture); return(result); }
public override object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { var result2 = Second?.ConvertBack(value, targetType, parameter, culture) ?? value; var result1 = First?.ConvertBack(result2, targetType, parameter, culture) ?? result2; return(result1); }
public override object[] ConvertBack(object v, Type[] tt, object p, CultureInfo c) { if (Then != null) { v = Then.ConvertBack(v, v != null ? v.GetType() : typeof(object), p, c); } return(First.ConvertBack(v, tt, p, c)); }
public override object ConvertBack(object v, Type t, object p, CultureInfo c) { if (Then != null) { v = Then.ConvertBack(v, t, p, c); } if (First != null) { v = First.ConvertBack(v, t, p, c); } return(v); }
/// <summary> /// Modifies the target data before passing it to the source object. This method is called only in <see cref="F:System.Windows.Data.BindingMode.TwoWay" /> bindings. /// </summary> /// <param name="value">The target data being passed to the source.</param> /// <param name="targetType">The <see cref="T:System.Type" /> of data expected by the source object.</param> /// <param name="parameter">An optional parameter to be used in the converter logic.</param> /// <param name="culture">The culture of the conversion.</param> /// <returns> /// The value to be passed to the source object. /// </returns> /// <exception cref="NullReferenceException">if value is null</exception> public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return(First.ConvertBack( value: Second.ConvertBack(value, targetType, parameter, culture), targetType: targetType, parameter: parameter, culture: culture)); }
/// <inheritdoc /> protected override object?ConvertBack(object?v, Type?t, object?p, CultureInfo?c) { var other = Other; if (other != null) { for (var i = other.Length - 1; i >= 0; i--) { var converter = other[i]; if (converter != null) { v = converter.ConvertBack(v, t, p, c); } } } if (other != null && other.Length > 0) { for (var i = other.Length - 1; i >= 0; i--) { if (other[i] != null) { v = other[i].ConvertBack(v, t, p, c); } } } if (Then != null) { v = Then.ConvertBack(v, t, p, c); } if (First != null) { v = First.ConvertBack(v, t, p, c); } return(v); }