-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
InvestigateRequires further investigation by the WPF team.Requires further investigation by the WPF team.
Description
Description
Binding and MultiBinding have different behavior when return value's type not match targetType.
Reproduction Steps
<TextBlock>
<TextBlock.Text>
<Binding Converter="{StaticResource TestConverter}"/>
</TextBlock.Text>
</TextBlock>internal class TestConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return 0.46164641164;
}🆗
<TextBlock>
<TextBlock.Text>
<MultiBinding Converter="{StaticResource TestConverter}"/>
</TextBlock.Text>
</TextBlock>internal class TestConverter : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
return 0.46164641164;
}❌System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property. Double:'0.46164641164' MultiBindingExpression:target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')
Expected behavior
all 🆗
Actual behavior
Binding 🆗
MultiBinding ❌
Regression?
No response
Known Workarounds
No response
Impact
No response
Configuration
No response
Other information
No response
lindexi and AccMJZ
Metadata
Metadata
Assignees
Labels
InvestigateRequires further investigation by the WPF team.Requires further investigation by the WPF team.