|
|
@ -48,7 +48,7 @@ namespace Avalonia.Data |
|
|
/// Gets or sets the binding priority.
|
|
|
/// Gets or sets the binding priority.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public BindingPriority Priority { get; set; } |
|
|
public BindingPriority Priority { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the relative source for the binding.
|
|
|
/// Gets or sets the relative source for the binding.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
@ -77,12 +77,12 @@ namespace Avalonia.Data |
|
|
// We only respect `StringFormat` if the type of the property we're assigning to will
|
|
|
// We only respect `StringFormat` if the type of the property we're assigning to will
|
|
|
// accept a string. Note that this is slightly different to WPF in that WPF only applies
|
|
|
// accept a string. Note that this is slightly different to WPF in that WPF only applies
|
|
|
// `StringFormat` for target type `string` (not `object`).
|
|
|
// `StringFormat` for target type `string` (not `object`).
|
|
|
if (!string.IsNullOrWhiteSpace(StringFormat) && |
|
|
if (!string.IsNullOrWhiteSpace(StringFormat) && |
|
|
(targetType == typeof(string) || targetType == typeof(object))) |
|
|
(targetType == typeof(string) || targetType == typeof(object))) |
|
|
{ |
|
|
{ |
|
|
converter = new StringFormatMultiValueConverter(StringFormat, converter); |
|
|
converter = new StringFormatMultiValueConverter(StringFormat, converter); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var children = Bindings.Select(x => x.Initiate(target, null)); |
|
|
var children = Bindings.Select(x => x.Initiate(target, null)); |
|
|
|
|
|
|
|
|
var input = children.Select(x => x.Observable) |
|
|
var input = children.Select(x => x.Observable) |
|
|
@ -116,8 +116,13 @@ namespace Avalonia.Data |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var culture = CultureInfo.CurrentCulture; |
|
|
var culture = CultureInfo.CurrentCulture; |
|
|
var converted = converter?.Convert(values, targetType, ConverterParameter, culture) |
|
|
object converted; |
|
|
?? values.ToArray(); |
|
|
if (converter != null) |
|
|
|
|
|
{ |
|
|
|
|
|
converted = converter.Convert(values, targetType, ConverterParameter, culture); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
converted = values.ToArray(); |
|
|
|
|
|
|
|
|
if (converted == null) |
|
|
if (converted == null) |
|
|
{ |
|
|
{ |
|
|
|