Xaml 如何绑定到已绑定的对象?
在xaml中,我有图像的依赖属性(它的工作方式类似于缓存)。现在,我想将PanAndZoomImage绑定到同一个图像,但它不能使用DP,因为它不是从图像继承的 我能像你一样装订吗Xaml 如何绑定到已绑定的对象?,xaml,windows-phone-7,data-binding,telerik,bind,Xaml,Windows Phone 7,Data Binding,Telerik,Bind,在xaml中,我有图像的依赖属性(它的工作方式类似于缓存)。现在,我想将PanAndZoomImage绑定到同一个图像,但它不能使用DP,因为它不是从图像继承的 我能像你一样装订吗 <Image x:Name="BigImage" wpExtensions:ImageProperties.LazyLink="{Binding ProductItem.Image}" />
<Image
x:Name="BigImage"
wpExtensions:ImageProperties.LazyLink="{Binding ProductItem.Image}" />
<slideView:PanAndZoomImage
Grid.Row="1"
ZoomMode="Free"
Source="{Binding BigImage}" // How to bind here to image?
可以使用元素名称绑定:
<slideView:PanAndZoomImage
Grid.Row="1"
ZoomMode="Free"
Source="{Binding Source,ElementName=BigImage}"
实际上,我是用codebehind制作的,但使用ElementName更为自然和优雅。