是否可以将控件的值绑定到另一个,例如:
<Stepper x:Name="myValue"
Maximum="1000"
Minimum="0"
Value="{Binding myValue,Mode=TwoWay}" />
<Entry Keyboard="Numeric"
Text="{Binding myValue}"
TextColor="Black" />
答案 0 :(得分:1)
使用{x:Reference }
标记扩展程序
<Stepper x:Name="myValue"
Maximum="1000"
Minimum="0"
Value="{Binding myValue, Mode=TwoWay}" />
<Entry Keyboard="Numeric"
Text="{Binding Value, Source={x:Reference myValue}}"
TextColor="Black" />