2017-08-09 102 views

回答

0

你可以用X:名称命名视图,则是指在其他地方用x:参考。如下所示:

<Slider x:Name="slider" 
     Maximum="360" /> 

<Label BindingContext="{x:Reference slider}" 
     Text="{Binding Value, StringFormat='The angle is {0:F0} degrees'}" /> 

Here is an article显示了这种和其他绑定技术。