listbox内的textblock如何分成3列
<Grid Grid.Row="1" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<ListBox Name="listbox" Grid.Row="1" Grid.RowSpan="3">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" >
<<TextBlock Grid.Column="0" Text="{Binding Date}"></TextBlock>
<TextBlock Grid.Column="1" Text="{Binding Customer}"></TextBlock>
<TextBlock Grid.Column="2" Text="{Binding Money}"></TextBlock>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid> wp7
[解决办法]
<ListBox DataContext="1234567890-=" ItemsSource="{Binding}">
<ListBox.ItemTemplate>
<DataTemplate>
<Border Margin="5" Width="140" Height="140" Background="Red">
<TextBlock Text="{Binding}" />
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<tookit:WrapPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>