<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="YahooNoticiasList">
        <Grid>
            <ListView ItemsSource="{Binding Items}"  SelectionMode="None" IsSwipeEnabled="False" IsItemClickEnabled="True"  commands:ItemClickCommand.Command="{Binding ItemClickCommand}"
                      ScrollViewer.VerticalScrollBarVisibility="Hidden"
                     ItemTemplate="{StaticResource YahooNoticiasItem}"/>
            <ProgressBar Height="40" VerticalAlignment="Top" IsIndeterminate="True" Visibility="{Binding ProgressBarVisibility}" />
        </Grid>
    </DataTemplate>

    <!-- ListBigVerticalCards Item -->
    <DataTemplate x:Key="YahooNoticiasItem">
        <Grid Style="{StaticResource BoxGrid}" Margin="0,0,0,10" Height="500">
            <Rectangle Width="900"/>
            <Grid Style="{StaticResource BoxGrid}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="280"/>
                    <RowDefinition Height="220"/>
                </Grid.RowDefinitions>
                <Image Grid.Row="0" Source="{Binding ImageUrl}" Stretch="UniformToFill" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                <Grid Grid.Row="1" Height="220" Margin="10,10,10,10">
                    <Grid Height="210">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Row="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>
            </Grid>
        </Grid>
    </DataTemplate>

    <!-- DetailPhoto -->
    <Style x:Key="PhotoCustomToggleButtonStyle" TargetType="ToggleButton">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Grid Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="PointerOver"/>
                                <VisualState x:Name="Pressed"/>
                                <VisualState x:Name="Disabled"/>
                                <VisualState x:Name="Checked"/>
                                <VisualState x:Name="CheckedPointerOver"/>
                                <VisualState x:Name="CheckedPressed"/>
                                <VisualState x:Name="CheckedDisabled"/>
                                <VisualState x:Name="Indeterminate"/>
                                <VisualState x:Name="IndeterminatePointerOver"/>
                                <VisualState x:Name="IndeterminatePressed"/>
                                <VisualState x:Name="IndeterminateDisabled"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Margin="{ThemeResource PhoneTouchTargetOverhang}">
                            <ContentPresenter x:Name="EnabledContent" AutomationProperties.AccessibilityView="Raw" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}"
                                              Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <DataTemplate x:Key="YahooNoticias1DetailDetail">
        <Grid>
            <ToggleButton x:Name="FullScreenToggleButton" IsChecked="true" Style="{StaticResource PhotoCustomToggleButtonStyle}" VerticalAlignment="Center" HorizontalAlignment="Center">
                <Image Source="{Binding ImageUrl}"/>
            </ToggleButton>
            <Grid Margin="12,12,12,12" VerticalAlignment="Bottom" HorizontalAlignment="Center" MaxHeight="200" 
                  Visibility="{Binding IsChecked, ElementName=FullScreenToggleButton, Converter={StaticResource BoolToVisibilityConverter}}">
                <Grid.Background>
                    <SolidColorBrush Color="{StaticResource BoxBackgroundColor}" Opacity="0.8"/>
                </Grid.Background>
                <ScrollViewer ZoomMode="Disabled">
                    <StackPanel Margin="12,6,12,6">
                        <Rectangle Width="900"/>
                        <TextBlock Text="{Binding Title}" Style="{StaticResource BoxTitleStyle}"/>
                        <TextBlock Margin="0,6,0,0" Text="{Binding Title}" Style="{StaticResource BoxTitleStyle}"/>
                        <RichTextBlock Margin="0,6,0,0" Style="{StaticResource BoxRichDescriptionStyle}" html2xaml:Properties.Html="{Binding Content}" html2xaml:Properties.ContainsCrlf="False" />
                    </StackPanel>
                </ScrollViewer>
            </Grid>
        </Grid>
    </DataTemplate>
    <DataTemplate x:Key="LandscapeYahooNoticias1DetailDetail">
        <Grid>
            <ToggleButton x:Name="FullScreenToggleButton" IsChecked="true" Style="{StaticResource PhotoCustomToggleButtonStyle}" VerticalAlignment="Center" HorizontalAlignment="Center">
                <Image Source="{Binding ImageUrl}"/>
            </ToggleButton>
            <Grid Margin="12,12,12,12" VerticalAlignment="Bottom" HorizontalAlignment="Center" MaxHeight="180" 
                  Visibility="{Binding IsChecked, ElementName=FullScreenToggleButton, Converter={StaticResource BoolToVisibilityConverter}}">
                <Grid.Background>
                    <SolidColorBrush Color="{StaticResource BoxBackgroundColor}" Opacity="0.8"/>
                </Grid.Background>
                <ScrollViewer ZoomMode="Disabled">
                    <StackPanel Margin="12,6,12,6">
                        <Rectangle Width="900"/>
                        <TextBlock Text="{Binding Title}" Style="{StaticResource BoxTitleStyle}"/>
                        <TextBlock Margin="0,6,0,0" Text="{Binding Title}" Style="{StaticResource BoxTitleStyle}"/>
                        <RichTextBlock Margin="0,6,0,0" Style="{StaticResource BoxRichDescriptionStyle}" html2xaml:Properties.Html="{Binding Content}" html2xaml:Properties.ContainsCrlf="False"/>
                    </StackPanel>
                </ScrollViewer>
            </Grid>
        </Grid>
    </DataTemplate>
</ResourceDictionary>
