我有两个文本框,一个用于帐单地址字段,一个用于送货地址字段。当用户在帐单地址文本框中键入内容时,由于以下绑定场景,送货地址文本框会获得相同的值:
<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 方法。仅当直接在送货地址文本框中输入内容时才会触发它。
我错过了什么?