Windows phone 7 列表框中的浮动项
我需要浮动列表框中的项目,使它们看起来像两行。。。我该怎么办?我已经试过了,但它们仍然一个接一个地出现。。。我的xml:Windows phone 7 列表框中的浮动项,windows-phone-7,Windows Phone 7,我需要浮动列表框中的项目,使它们看起来像两行。。。我该怎么办?我已经试过了,但它们仍然一个接一个地出现。。。我的xml: <ListBox Name="listacomico" Width="480" Margin="0,112,0,0"> <ListBox.ItemTemplate> <DataTemplate> <Button Background="White" Bor
<ListBox Name="listacomico" Width="480" Margin="0,112,0,0">
<ListBox.ItemTemplate>
<DataTemplate>
<Button Background="White" BorderBrush="#346699" Click="apri_comico" Name="{Binding Myordine}" Margin="0,0,0,0" Padding="0" HorizontalAlignment="Left" HorizontalContentAlignment="Left">
<Button.Content>
<StackPanel Orientation="Horizontal" Width="125">
<Image Source="{Binding Myimmagine}" HorizontalAlignment="Left" VerticalAlignment="Top" />
</StackPanel>
</Button.Content>
</Button>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
如果您想显示彼此相邻的项目,您必须使用上面评论中建议的包装 这不是与ItemTemplate相关的行为。ItemTemplate将定义项目的外观 要实现您想要做的事情,您必须定义项目span,如下所示:
<ListBox ItemsSource="{Binding CollectionSource}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<toolkit:WrapPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
如果项目尚未完成,则必须将对的引用添加到项目中 你一点道理都没有。有人能帮我吗?每行可以做两个项目吗?为了清楚起见,你能编辑这个问题吗?我试着读了好几遍,仍然不太明白你在问什么。在列表框中,一个项目在另一个项目下。。。好啊我每行需要两个项目。。。我的物品大小合适,但我不能:我想在这里做个包装。但举个例子,对这个家伙来说可能是白费力气。非常感谢!它起作用了!我已经使用了这个工具包,因为我使用了转换效果。现在我在这里。。。我能问你件事吗?我需要通过xaml.cs替换图像源,我在xaml:中有这个,在.cs:faccia.source=new System.Windows.Media.Imaging.BitmapImage(新Uri(“/Myapp;component/comici/”+url\img.Value))中有这个;但它什么也没显示!您确定Uri是正确的吗?您可以在ImageFailed事件上添加eventhandler以确保:但是是否有充分的理由从代码隐藏加载映像?你不能用装订吗?
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"