__________________________
__________Item1____________
__________Imemnumber2_____
__________Item3____________
__________________________
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<ListBox x:Name="MainListBox" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,-12,0" ItemsSource="{Binding Items}" SelectionChanged="MainListBox_SelectionChanged" >
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Margin="10">
<Image Source="{Binding Image}" Stretch="None"/>
<TextBlock Text="{Binding Title}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
我该怎么做?
____________________________
___________Item1_____________
_________Imemnumber2________
___________item3_____________
____________________________
答案 0 :(得分:0)
尝试设置TextBox的TextAlignment属性
<TextBlock Text="{Binding Title}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" TextAlignment="Center"/>
更新:
尝试修复TextBlock的宽度,如下所示
<TextBlock Text="{Binding Title}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" TextAlignment="Center" Width="400"/>