【发布时间】:2013-09-25 21:45:55
【问题描述】:
我基本上有一个带有 2 个全景项目的全景控件,其中仅包含不同项目的列表。我按照 windows phone 上的教程来检测用户何时到达列表末尾,然后显示新项目 - fire (call) method, when scrollviewer scrolled to its end,
但是我的问题是我需要这两个列表框,所以我确实注册了 2 个不同的依赖属性,但是我如何才能将依赖属性与特定列表框“链接”,因为这两者混淆了。
谢谢
列表框 1
<ListBox Foreground="Black"
x:Name="nuus"
Loaded="nuus_Loaded_1"
ItemsSource="{Binding Story}"
SelectionChanged="nuus_SelectionChanged_1">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="12,2,0,4" Height="105" Width="432">
<Image Width="115" Height="115" Source="{Binding ImageUrl}"/>
<StackPanel Width="311" Margin="8,0,0,0">
<TextBlock Text="{Binding Title}"
TextWrapping="Wrap"
FontWeight="Bold"
Margin="10,0"
Foreground="Black"
FontSize="20"/>
<TextBlock Text="{Binding CreationDate}"
TextWrapping="Wrap"
Foreground="Black"
Margin="10,-2,10,0"
FontSize="20"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
【问题讨论】:
标签: c# windows-phone-7 windows-phone-8 windows-phone dependency-properties