<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:AppStudio.Controls"
    xmlns:html2xaml="using:AppStudio.Controls.Html2Xaml"
    xmlns:commands="using:AppStudio.Commands">

    <!-- ListBigVerticalCards -->
    <DataTemplate x:Key="TecnogeekList">
        <Grid>
            <GridView ItemsSource="{Binding PreviewItems}" SelectionMode="None" IsSwipeEnabled="False" IsItemClickEnabled="True" commands:ItemClickCommand.Command="{Binding ItemClickCommand}"
                      ScrollViewer.VerticalScrollBarVisibility="Hidden"
                      ItemTemplate="{StaticResource TecnogeekItem}"/>
            <ProgressBar Height="40" VerticalAlignment="Top" IsIndeterminate="True" Visibility="{Binding ProgressBarVisibility}" />
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="TecnogeekListSnapped">
        <Grid>
            <GridView ItemsSource="{Binding PreviewItems}" SelectionMode="None" IsSwipeEnabled="False" IsItemClickEnabled="True" commands:ItemClickCommand.Command="{Binding ItemClickCommand}"
                      ScrollViewer.VerticalScrollBarVisibility="Hidden"
                      ItemTemplate="{StaticResource TecnogeekItemSnapped}"/>
            <ProgressBar Height="40" VerticalAlignment="Top" IsIndeterminate="True" Visibility="{Binding ProgressBarVisibility}" />
        </Grid>
    </DataTemplate>

    <!-- ListBigVerticalCards Item -->
    <DataTemplate x:Key="TecnogeekItem">
        <Grid Width="480" Height="530" Style="{StaticResource BoxGrid}">
            <Grid.RowDefinitions>
                <RowDefinition Height="0.6*"/>
                <RowDefinition Height="0.4*"/>
            </Grid.RowDefinitions>
            <Image Grid.Row="0" Source="{Binding ImageUrl}" Stretch="UniformToFill" VerticalAlignment="Center" HorizontalAlignment="Center"/>
            <Grid Margin="10,10,10,10" Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0" Margin="0,5,0,0" Style="{StaticResource BoxTitleStyle}" Text="{Binding Title}"  MaxLines="2"/>
                <TextBlock Grid.Row="1" Margin="0,5,0,0" Style="{StaticResource BoxSubtitleStyle}" Text="{Binding Summary}"/>
            </Grid>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="TecnogeekItemSnapped">
        <Grid Width="220" Style="{StaticResource BoxGrid}">
            <Grid.RowDefinitions>
                <RowDefinition Height="0.55*"/>
                <RowDefinition Height="0.45*"/>
            </Grid.RowDefinitions>
            <Image Grid.Row="0" Source="{Binding ImageUrl}" Stretch="UniformToFill" VerticalAlignment="Center" HorizontalAlignment="Center"/>
            <Grid Margin="10,10,10,10" Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0" Margin="0,5,0,0" Style="{StaticResource BoxTitleStyle}" Text="{Binding Title}" MaxLines="1"/>
                <TextBlock Grid.Row="1" Margin="0,5,0,0" Style="{StaticResource BoxSubtitleStyle}" Text="{Binding Summary}" MaxLines="1"/>
            </Grid>
        </Grid>
    </DataTemplate>

    <!-- DetailPhoto -->
    <DataTemplate x:Key="Tecnogeek1DetailDetail">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width=".7*" />
            </Grid.ColumnDefinitions>

            <Image Grid.ColumnSpan="2" Source="{Binding ImageUrl}" />

            <Border Grid.Column="0" Margin="40,0,0,40" MaxHeight="200"
                    VerticalAlignment="Bottom"
                    Visibility="{Binding ElementName=ViewInfoToggleButton, Mode=OneWay, Path=IsChecked, Converter={StaticResource BoolToVisibilityConverter}}">
                <Border.Background>
                    <SolidColorBrush Color="{StaticResource BoxBackgroundColor}" Opacity="0.8" />
                </Border.Background>
                <Grid Margin="40,20,20,20">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Text="{Binding Title}" Margin="0,0,0,20" Style="{StaticResource BoxTitleStyle}"/>
                    <TextBlock Grid.Row="1" Text="{Binding Title}" Margin="10,0,0,20" Style="{StaticResource BoxTitleStyle}"/>
                    <ScrollViewer Grid.Row="2" VerticalAlignment="Bottom" Margin="10,0,0,0" ZoomMode="Disabled">
                        <RichTextBlock Style="{StaticResource BoxRichDescriptionStyle}" Foreground="{StaticResource BoxForeground}"
                                       html2xaml:Properties.Html="{Binding Content}" html2xaml:Properties.ContainsCrlf="False" />
                    </ScrollViewer>
                </Grid>
            </Border>
            <AppBarToggleButton x:Name="ViewInfoToggleButton" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,10"
                                IsCompact="True" IsChecked="True" Style="{StaticResource InfoAppBarToggleButtonStyle}">
                <AppBarToggleButton.Icon>
                    <FontIcon FontFamily="Arial" Glyph="&#x0069;" />
                </AppBarToggleButton.Icon>
            </AppBarToggleButton>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="Tecnogeek1DetailDetailSnapped">
        <Grid>
            <Image Source="{Binding ImageUrl}" />

            <Border Margin="40" MaxHeight="200"
                    VerticalAlignment="Bottom"
                    Visibility="{Binding ElementName=ViewInfoToggleButton, Mode=OneWay, Path=IsChecked, Converter={StaticResource BoolToVisibilityConverter}}">
                <Border.Background>
                    <SolidColorBrush Color="{StaticResource BoxBackgroundColor}" Opacity="0.8" />
                </Border.Background>
                <Grid Margin="40,20,20,20">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Text="{Binding Title}" Margin="0,0,0,20" Style="{StaticResource BoxTitleStyle}" />
                    <TextBlock Grid.Row="1" Text="{Binding Title}" Margin="10,0,0,20" Style="{StaticResource BoxTitleStyle}"/>
                    <ScrollViewer Grid.Row="2" VerticalAlignment="Bottom" Margin="10,0,0,0" ZoomMode="Disabled">
                        <RichTextBlock Style="{StaticResource BoxRichDescriptionStyle}" html2xaml:Properties.Html="{Binding Content}" html2xaml:Properties.ContainsCrlf="False" />
                    </ScrollViewer>
                </Grid>
            </Border>
            <AppBarToggleButton x:Name="ViewInfoToggleButton" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,10,0"
                                IsCompact="True" IsChecked="True" Style="{StaticResource InfoAppBarToggleButtonStyle}">
                <AppBarToggleButton.Icon>
                    <FontIcon FontFamily="Arial" Glyph="&#x0069;" />
                </AppBarToggleButton.Icon>
            </AppBarToggleButton>
        </Grid>
    </DataTemplate>
</ResourceDictionary>
