My Situation put simply is that if i have a textbox, lets call it A. when i update the value in this text box it should update a label - B. when B changes then it should update another label C.
so, effectively i wish to emply binding in the form of C bind to B which binds to A.
i have tried the following but C never gets updated.
<TextBox Grid.Row="0" Name="A"/>
<Label Grid.Row="开发者_运维百科1" Name="B" Content="{Binding Text, ElementName=A, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="2" Name="C" Content="{Binding Text, ElementName=B}"/>
Try it like this:
<TextBox Grid.Row="0" Name="A"/>
<Label Grid.Row="1" Name="B" Content="{Binding Text, ElementName=A}"/>
<Label Grid.Row="2" Name="C" Content="{Binding Content, ElementName=B}"/>
You have to bind to the Content property.
精彩评论