I have problem with HorizontalAlignment of TextBlock in ListBox ItemTemplate. This is part of my code:
<ListBox x:Name="mealList" ItemsSource="{Binding Meals}" >
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Name}" Margin="10" Grid.Column="0" TextWrapping="Wrap" Style="{StaticResource PhoneTextSmallStyle}"/>
<TextBlock Text="{Binding Price}" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Style="{StaticResource PhoneTextSmallStyle}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
In App I have this list of things:
But I want, that right column with "xx,- Kč" has HorizontalAlignment="Right". Every item in this column should be on the righ side of screen and below previous item. Second column in second row should be below second column in first row. Do you understand?
Can you help me? I can post more of code.