【发布时间】:2017-01-21 11:03:12
【问题描述】:
我是pivotviewer 和silverlight 的新手。我创建了一个observablecollection,它有
属性
public string StaffName { get; set; }
public string Location {get;set;}
使用BuildCollection() 方法,我通过以下方式将其绑定到mainpage.xaml:
<pivot:PivotViewer x:Name="pViewer">
<pivot:PivotViewer.ItemTemplates>
<pivot:PivotViewerItemTemplate MaxWidth="300">
<Border Width="300" Height="300"
<TextBlock Text="{Binding StaffName}"
FontSize="90"
FontWeight="Bold"
Foreground="White"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</pivot:PivotViewerItemTemplate>
</pivot:PivotViewer.ItemTemplates>
</pivot:PivotViewer>
现在我想绑定位于clientbin 中的CXML 文件cities.cxml,它具有图像和名为Location 的属性。我想在集合和 cxml 之间创建一个链接,以便当我对显示人员姓名的集合进行深度缩放时,它应该淡入 cxml 集合中的城市图像。对于 ex Location is london in observable collection 我应该将它从 cxml 文件中深度缩放到伦敦的图像。任何人都可以帮助实现这一目标吗?谢谢。
【问题讨论】:
标签: silverlight-5.0 cxml-collectionxml