RouteSelectPage.xaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <Page
  2. x:Class="Breda_Tour.RouteSelectScreen.RouteSelectPage"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:local="using:Breda_Tour.RouteSelectScreen"
  6. xmlns:c="using:Breda_Tour.CustomControls"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:data="using:Breda_Tour.Data"
  10. xmlns:con="using:Breda_Tour.RouteSelectScreen"
  11. mc:Ignorable="d" GotFocus="Page_GotFocus">
  12. <Grid>
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="40"/>
  15. <RowDefinition Height="50" />
  16. <RowDefinition Height="*"/>
  17. </Grid.RowDefinitions>
  18. <c:DefaultTopBar x:Uid="RouteSelectPagetxtSelectRoute" Header="Route Selecteren"/>
  19. <c:DefaultPivotControl x:Name="DefaultPivot" Grid.Row="1"/>
  20. <RelativePanel Grid.Row="2" Padding="0,10,0,5" Background="White">
  21. <RelativePanel.Resources>
  22. <con:Converter x:Key="BoolToVis"/>
  23. <con:BoolToString x:Key="BoolToString"/>
  24. </RelativePanel.Resources>
  25. <ListView RelativePanel.AlignLeftWithPanel="True"
  26. RelativePanel.AlignRightWithPanel="True"
  27. x:Name="Routes" ItemsSource="{x:Bind CurrentRoutes}"
  28. IsItemClickEnabled="True"
  29. ItemClick="Routes_ItemClick"
  30. HorizontalContentAlignment="Stretch">
  31. <ListView.ItemTemplate>
  32. <DataTemplate x:DataType="data:Route">
  33. <StackPanel>
  34. <StackPanel Orientation="Horizontal">
  35. <Image Source="ms-appx:///Assets/Map_Icon.png" Width="35" Height="35"/>
  36. <TextBlock Text="{Binding Title}" FontSize="24" Margin="15,0,0,0"/>
  37. <ToggleButton x:Name="toggleButton" Background="Transparent" IsChecked="False" Width="40" Height="40" Margin="35,0,0,0">
  38. <Image Source="{Binding Path=IsChecked, ElementName=toggleButton,Converter={StaticResource BoolToString}}" Height="29" Margin="-10,0,-9,-1"/>
  39. </ToggleButton>
  40. </StackPanel>
  41. <StackPanel Orientation="Horizontal" Width="340" Visibility="{Binding Path=IsChecked, ElementName=toggleButton,Converter={StaticResource BoolToVis}}">
  42. <Image Source="ms-appx:///Assets/Flag_Icon.png" Width="25" Height="25" Margin="45,0,0,0"/>
  43. <TextBlock Text="Breda" Foreground="DarkGray" FontSize="16" Margin="15,0,0,0"/>
  44. </StackPanel>
  45. <Rectangle Height="2" HorizontalAlignment="Stretch" Fill="Gray"/>
  46. </StackPanel>
  47. </DataTemplate>
  48. </ListView.ItemTemplate>
  49. </ListView>
  50. </RelativePanel>
  51. </Grid>
  52. </Page>