ForecastView.xaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. x:Class="MyWeather.View.ForecastView"
  5. Title="Forecast">
  6. <ListView ItemsSource="{Binding Forecast.Items}"
  7. HasUnevenRows="True"
  8. CachingStrategy="RecycleElement"
  9. IsPullToRefreshEnabled="True"
  10. RowHeight="66"
  11. RefreshCommand="{Binding GetWeatherCommand}"
  12. IsRefreshing="{Binding IsBusy, Mode=OneWay}">
  13. <ListView.SeparatorColor>
  14. <OnPlatform x:TypeArguments="Color" iOS="Transparent"/>
  15. </ListView.SeparatorColor>
  16. <ListView.ItemTemplate>
  17. <DataTemplate>
  18. <ViewCell>
  19. <StackLayout Orientation="Horizontal" Padding="10,0,0,0">
  20. <Image HeightRequest="44"
  21. WidthRequest="44"
  22. Source="{Binding DisplayIcon}"/>
  23. <StackLayout Padding="10" Spacing="5">
  24. <Label Text="{Binding DisplayTemp}"
  25. TextColor="#3498db"
  26. Style="{DynamicResource ListItemTextStyle}"/>
  27. <Label Text="{Binding DisplayDate}"
  28. Style="{DynamicResource ListItemDetailTextStyle}"/>
  29. </StackLayout>
  30. </StackLayout>
  31. </ViewCell>
  32. </DataTemplate>
  33. </ListView.ItemTemplate>
  34. </ListView>
  35. </ContentPage>
  36. <!---->