我有两个文本框,一个用于账单地址,另一个用于发货地址。当用户在账单地址文本框中输入内容时,由于以下绑定场景,发货地址文本框会得到相同的值:
<TextBox Name="txtBillingAddress" Text="{Binding BillingAddress, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
<TextBox Name="txtShippingAddress">
<TextBox.Text>
<MultiBinding Converter="{StaticResource AddressConverter}">
<Binding ElementName="txtBillingAddress" Path="Text" Mode="OneWay" />
<Binding Path="ShippingAddress" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay" />
</MultiBinding>
</TextBox.Text>
</TextBox>
这个功能在某些程度上很好用。我也想像账单地址一样将送货地址绑定到我的数据库实体上。但我的问题是,尽管运输地址文本框中填充了账单地址的内容,但在此过程中并没有触发ConvertBack方法。只有在直接输入运输地址文本框时才会触发。
我错过了什么吗?