は、私はほとんどすべてを試してみましたが、何らかの理由でそれがXAMLの上テキストをListBoxの中央に移動する方法は?
<StackPanel Orientation="Vertical" Grid.Row="1" Margin="5,30,5,10">
<TextBlock Text="View Options" FontSize="25" Style="{StaticResource PhoneTextNormalStyle}"/>
<ListBox HorizontalContentAlignment="Stretch" Background="Red" ItemsSource="{Binding Path=ViewOptions}" Margin="10">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding}" FontSize="35" Margin="20" Style="{StaticResource PhoneTextNormalStyle}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
が動作していないが、私は
どうlistboxitem
のcenter
にtextblock
を移動するために与えますか?
こちらをご覧くださいhttp://stackoverflow.com/questions/21746433/how-to-add-list-item-selector-to-listbox – Goofy