对WP的LongListSelector项目之间的分隔符 [英] Separator Between Items in LongListSelector on WP
本文介绍了对WP的LongListSelector项目之间的分隔符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有粘合到联系人列表中的LongListSelector,我想补充一点线分隔每个联系人。
I Have a LongListSelector which is bonded to a contact list , i would like to add a little line to separate each contacts .
下面是我的XAML:
<phone:LongListSelector>
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<StackPanel Orientation = "Horizontal" >
<TextBlock Text="{Binding informations}" Height="120" />
<Image Source="{Binding photo}" Height="90" Width="90" />
<Line Fill="Red" Height="2" />
</StackPanel>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
但是,在项目之间没有红线,我怎么可以添加一个?
But there is no red line between the items, how can I add one?
编辑:
是否有什么关系的事实,我的StackPanel的方向是水平?
Does it have to do with the fact that the orientation of my StackPanel is Horizontal?
推荐答案
是的,这是因为水平。
试试这个:
<phone:LongListSelector>
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<StackPanel>
<StackPanel Orientation = "Horizontal" >
<TextBlock Text="{Binding informations}" Height="120" />
<Image Source="{Binding photo}" Height="90" Width="90" />
</StackPanel>
<Line Fill="Red" Height="2" />
</StackPanel>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
这篇关于对WP的LongListSelector项目之间的分隔符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文