0

水平方向のリストボックスの新しい行でアイテムを開始するにはどうすればよいですか? これはこれまでの私のコードですが、すべてのアイテムが1行に表示されます。事前に感謝します

<phone:PanoramaItem Header="Geklassifiseerd" Orientation="Horizontal" Foreground="Black">
            <ListBox x:Name="geklassifisseerd_list">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel>
                            <TextBlock Text="{Binding Name}" TextWrapping="Wrap" 
                                           Margin="10,0" 
                                           Foreground="Black"
                                           FontSize="20"
                                           />
                            <TextBlock Text="{Binding Date}" 
                                           TextWrapping="Wrap" 
                                           Foreground="Black"
                                           Margin="10,-2,10,0" 
                                           FontSize="20"
                                           />
                            <TextBlock Text="{Binding Image_uri}" 
                                           TextWrapping="Wrap" 
                                           Margin="10,-2,10,0" 
                                           Foreground="Black"
                                          />
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>

                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>

            </ListBox>
4

1 に答える 1

0

答えを得たので、itemspanetemplate で wrappanel を使用したため、アセンブリの衝突が発生しました。ナゲット経由で Microsoft.phone.controls アセンブリを再インストールすることで解決しました。

               <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <Controls:WrapPanel Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
于 2013-07-25T07:31:52.163 に答える