RouteSelectPage.xaml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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">
  12. <Grid>
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="40"/>
  15. <RowDefinition Height="50" />
  16. <RowDefinition Height="*"/>
  17. </Grid.RowDefinitions>
  18. <c:DefaultTopBar Header="Route Selecteren"/>
  19. <c:DefaultPivotControl x:Name="DefaultPivot" Grid.Row="1"/>
  20. <RelativePanel Grid.Row="2" Margin="0,5">
  21. <RelativePanel.Resources>
  22. <con:Converter x:Key="BoolToVis"/>
  23. </RelativePanel.Resources>
  24. <ListView x:Name="Routes" ItemsSource="{x:Bind AllRoutes.Routes}" IsItemClickEnabled="True" ItemClick="Routes_ItemClick">
  25. <ListView.ItemTemplate>
  26. <DataTemplate x:DataType="data:Route">
  27. <StackPanel>
  28. <StackPanel Orientation="Horizontal" Width="340">
  29. <Image Source="ms-appx:///Assets/Map_Icon.png" Width="35" Height="35"/>
  30. <TextBlock Text="{Binding Title}" FontSize="24" Margin="15,0,0,0"/>
  31. <ToggleButton x:Name="toggleButton" IsChecked="False" Margin="35,0,0,0">
  32. </ToggleButton>
  33. </StackPanel>
  34. <StackPanel Orientation="Horizontal" Width="340" Visibility="{Binding Path=IsChecked, ElementName=toggleButton,Converter={StaticResource BoolToVis}}">
  35. <Image Source="ms-appx:///Assets/Flag_Icon.png" Width="25" Height="25" Margin="45,0,0,0"/>
  36. <TextBlock Text="Breda" Foreground="DarkGray" FontSize="16" Margin="15,0,0,0"/>
  37. </StackPanel>
  38. <Line X1="0" X2="1080" Y1="5" Y2="5" Stroke="Gray" StrokeThickness="2"/>
  39. </StackPanel>
  40. </DataTemplate>
  41. </ListView.ItemTemplate>
  42. </ListView>
  43. </RelativePanel>
  44. </Grid>
  45. </Page>