<Page
    x:Class="MyDriving.UWP.Views.TripSummaryView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:controls="using:MyDriving.UWP.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    x:Name="SUMMARY">

    <Grid Background="{StaticResource MainBackgroundColor2}">

        <ScrollViewer VerticalScrollBarVisibility="Hidden">
            <StackPanel>
                <Button x:Name="Close" VerticalAlignment="Top" HorizontalAlignment="Right" Height="40" Width="40" Click="ButtonClick_CloseView" Background="Transparent">
                    <Image Source="{StaticResource Close}"  Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                </Button>
                <StackPanel Margin="24,4,24,4">

                <StackPanel>
                    <TextBlock Text="You completed your trip!" HorizontalAlignment="Center" Margin="0,0,0,5" FontFamily="SegoeUI-Light" FontSize="21" Foreground="{StaticResource SummaryTextColor}" />
                    <TextBlock Text="Trip Summary" HorizontalAlignment="Center" Margin="0,5,0,15" FontFamily="SegoeUI-Semibold" FontSize="16" Foreground="White" FontWeight="Bold" />
                </StackPanel>

                    <controls:ProfileViewTabControl x:Name="TotalDistanceTab" DataContext="{x:Bind ViewModel.TotalDistance, Mode=OneWay, Converter={StaticResource DistanceConverter} }" />

                    <controls:ProfileViewTabControl x:Name="TotalTimeTab" DataContext="{x:Bind ViewModel.TotalTime, Mode=OneWay, Converter={StaticResource TimeConverter}, ConverterParameter=' {0}  seconds'}" />

                    <controls:ProfileViewTabControl x:Name="MaxSpeedTab" DataContext="{x:Bind ViewModel.MaxSpeedDisplay, Mode=OneWay}" />

                    <controls:ProfileViewTabControl x:Name="FuelConsumptionTab" DataContext="{x:Bind ViewModel.FuelDisplay, Mode=OneWay}" />

                    <controls:ProfileViewTabControl x:Name="HardBreaksTab" DataContext="{x:Bind ViewModel.HardStops, Mode=OneWay, Converter={StaticResource StringFormatConverter}, ConverterParameter=' {0}  times'}" />

                    <controls:ProfileViewTabControl x:Name="HardAccelerationsTab" DataContext="{x:Bind ViewModel.HardAccelerations, Mode=OneWay, Converter={StaticResource StringFormatConverter}, ConverterParameter=' {0}  times'}" />

                </StackPanel>
                
   
            </StackPanel>
        </ScrollViewer>

     

    </Grid>
</Page>
