I know this question sounds trivial but since I am new to windows phone development i cannot seem to understand how to do this in my scenario.
I have a
List<Forecast> forecasts
which i want to connect to my WeatherInfoBar
<Grid x:Name="WeatherInfoLowBar" Height="300" VerticalAlignment="Bottom">
<StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="0,0,0,0">
<StackPanel Grid.Row="4" Height="40" Orientation="Horizontal" Margin="0,0,0,0">
<TextBlock Text="Date" FontSize="22" TextAlignment="Left" Width="170"/>
<TextBlock Text="FC" FontSize="22" TextAlignment="Left" Width="60"/>
<TextBlock Text="Max" FontSize="22" TextAlignment="Right" Width="60"/>
<TextBlock Text="Min" FontSize="22" TextAlignment="Right" Width="90"/>
</StackPanel>
<Grid >
<StackPanel Height="40" Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock Text="{Binding date}" FontSize="22" TextAlignment="Left" Width="150"/>
<TextBlock Text=" " FontSize="20"/>
<Image Source="{Binding weatherIconUrl}" Width="40" Height="40"/>
<TextBlock Text=" " FontSize="20"/>
<TextBlock Text="{Binding tempMaxC, StringFormat='\{0\} °C'}" FontSize="22" TextAlignment="Right" Width="70"/>
<TextBlock Text=" " FontSize="20"/>
<TextBlock Text="{Binding tempMinC, StringFormat='\{0\} °C'}" FontSize="22" TextAlignment="Right" Width="70"/>
</StackPanel>
</Grid>
</StackPanel>
</Grid>
In code behind
WeatherInfoLowBar.DataContext = wio.forecasts;
for (int i = 0; i < wio.forecasts.Count(); i++ )
// what code goes in here ???