请问一下,windows phone的 ListBox控件,怎么弄才有细线分隔每一个item 项呢?
还有就是visual studio 2010 有没有快捷键“整行上移”和“整行下移”呢?
------解决方案--------------------------------------------------------
每个item加个border,然后控制border下面有宽度
就可以实现了
- XML code
<Border BorderThickness="0,0,0,2" > <Grid> 你的item </Grid> </Border>
------解决方案--------------------------------------------------------
试下这个吧。
- XML code
<ListBox x:Name="budgetTypeListBox" ItemsSource="{Binding}" Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Center"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Margin="0,15,0,10" TextAlignment="Center" Text="{Binding BudgetTypeName}"></TextBlock><!--用Border制作的分割线--> <Border HorizontalAlignment="Stretch" Height="3"> <Border.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF006A8B" Offset="0" />k <GradientStop Color="#FFD2E3E9" Offset="0.647" /> </LinearGradientBrush> </Border.Background> </Border> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox>