<UserControl x:Class="ZuneModdingHelper.Pages.ModsPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:core="clr-namespace:ZuneModCore;assembly=ZuneModCore"
             xmlns:b="clr-namespace:ZuneModdingHelper.Behaviors"
             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
             xmlns:local="clr-namespace:ZuneModdingHelper.Pages"
             mc:Ignorable="d"
             d:DesignHeight="450" d:DesignWidth="800">

    <ListView ItemContainerStyle="{StaticResource ZuneListViewItemContainerStyle}" Style="{DynamicResource ZuneListViewStyle}"
              x:Name="ModList" HorizontalContentAlignment="Stretch" BorderThickness="0"
              ScrollViewer.HorizontalScrollBarVisibility="Disabled" d:ItemsSource="{d:SampleData ItemCount=5}">
        <ListView.ItemTemplate>
            <DataTemplate DataType="{x:Type core:Mod}">
                <Border x:Name="RootBorder" BorderThickness="0">
                    <Grid Margin="8">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>

                        <TextBlock TextTrimming="CharacterEllipsis">
                            <Run Text="{Binding Title, Mode=OneWay}" FontWeight="SemiBold" FontSize="16"/>
                            <Run Text=" By "/><Run Text="{Binding Author, Mode=OneWay}"
                                                   Foreground="{StaticResource ZuneMediumTextBrush}"/>
                        </TextBlock>

                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                            <!--<TextBlock Text="&#xE73E;" Foreground="#646464"
                                       FontSize="16" FontFamily="{StaticResource SegoeMDL2}"
                                       VerticalAlignment="Center" HorizontalAlignment="Right" />-->
                            <!--<Image Source="D:\Repos\ZuneDev\ZuneShell.dll\ZuneShell\Resources\RCDATA\ATTENTION.PNG"
                                   Width="17" Height="18" SnapsToDevicePixels="True"
                                   VerticalAlignment="Center" HorizontalAlignment="Right"/>-->
                            <Button Content="RESET" Margin="0,0,8,0" Click="ResetButton_Click"
                                    Style="{StaticResource ActionButtonStyle}"/>
                            <Button Content="APPLY" Click="ApplyButton_Click"
                                    Style="{StaticResource ActionButtonStyle}"/>
                        </StackPanel>

                        <TextBlock Text="{Binding Description}" Grid.Row="1" Foreground="{StaticResource ZuneLightTextBrush}"
                                   FontSize="14" TextWrapping="Wrap"/>
                    </Grid>
                </Border>
            </DataTemplate>
        </ListView.ItemTemplate>

        <i:Interaction.Behaviors>
            <b:FadeAnimateItemsBehavior Tick="0:0:0.05">
                <b:FadeAnimateItemsBehavior.Animation>
                    <DoubleAnimation From="0" To="1" Duration="0:0:0.3"/>
                </b:FadeAnimateItemsBehavior.Animation>
            </b:FadeAnimateItemsBehavior>
        </i:Interaction.Behaviors>
    </ListView>

</UserControl>
