为什么不在新行中显示 xaml 的 StackPanel 中的所有项目?

why not display all items in StackPanel of xaml in new line?

我想在 windows phone 8 的 StackPanel 中将所有项目显示为长文本。 但是此代码仅在一行中显示所有项目,而其他项目不会转到下一行。 这是我的代码:

<StackPanel Grid.Row="0" Orientation="Horizontal" Width="300">
                                    <TextBlock Text="Id: "/>
                                    <TextBlock Text="{Binding Id}" TextWrapping="Wrap" FontWeight="Bold" FontSize="24" Foreground="GreenYellow" />
                                    <TextBlock Text=" , Adress:( " /><TextBlock Text="{Binding a3}" />
                                    <TextBlock Text=" , "/><TextBlock  Text="{Binding a2}" />
                                    <TextBlock Text=" , "/><TextBlock  Text="{Binding code}" />
                                    <TextBlock Text=" , "/><TextBlock  Text="{Binding a1"/>
                                </StackPanel>

这就是 StackPanel 的工作原理。您想要的行为是通过 WrapPanel 实现的,Windows Phone 8 中不存在。您可以在 Windows Phone Toolkit 中获得它;请注意,它仅适用于面向 Windows Phone Silverlight (8.0) 的应用程序,不适用于 WinRT (WP 8.1)。