<UserControl x:Class="TileSamplesLib.TileTypes" 
             x:Name="root"
             mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300" 
             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:c1="http://schemas.componentone.com/winfx/2006/xaml">
    <UserControl.Resources>
        <Style x:Key="listBoxItemStyle" TargetType="ListBoxItem">
            <Setter Property="c1:C1TileService.PointerDownAnimation" Value="True" />
            <Setter Property="Padding" Value="5" />
        </Style>
        <Style TargetType="c1:C1Tile" x:Key="baseTileStyle">
            <Setter Property="Background" Value="#ffeddd46" />
            <Setter Property="Foreground" Value="White" />
            <Setter Property="FontSize" Value="80" />
            <Setter Property="HeaderForeground" Value="White" />
            <Setter Property="HeaderFontSize" Value="12" />
            <Setter Property="BorderThickness" Value="0" />
            <Setter Property="Width" Value="280" />
            <Setter Property="Height" Value="200" />
        </Style>
        <Style TargetType="c1:C1Tile" BasedOn="{StaticResource baseTileStyle}">
        </Style>
        <Style TargetType="c1:C1SlideTile" BasedOn="{StaticResource baseTileStyle}">
        </Style>
    </UserControl.Resources>    
    
    <Grid>
        <ListBox ItemContainerStyle="{StaticResource listBoxItemStyle}" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <c1:C1WrapPanel />
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBox.Items>
                <c1:C1Tile Content="1" Header="C1Tile" HeaderPadding="12" Padding="0" HeaderBackground="#22000000" HorizontalHeaderAlignment="Stretch" />
                <c1:C1SlideTile Content="2" HeaderPadding="12" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Padding="0" Header="C1SlideTile">
                    <c1:C1Tile.ContentTemplate>
                        <DataTemplate>
                            <Border Background="#fff07e6e">
                                <TextBlock Text="{Binding}" VerticalAlignment="Center" HorizontalAlignment="Center" />
                            </Border>
                        </DataTemplate>
                    </c1:C1Tile.ContentTemplate>
                    <c1:C1Tile.BackContentTemplate>
                        <DataTemplate>
                            <Border Background="#ff90cd97">
                                <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                                    <TextBlock Text="{Binding}" Foreground="White" HorizontalAlignment="Center" />
                                    <TextBlock Text="Back Content Template" Margin="0 -10 0 0" FontSize="12" Foreground="White" HorizontalAlignment="Center" />
                                </StackPanel>
                            </Border>
                        </DataTemplate>
                    </c1:C1Tile.BackContentTemplate>
                </c1:C1SlideTile>
                <c1:C1SlideTile Content="3" BackContent="Back Content 3" FontSize="36" Header="C1SlideTile" HeaderPadding="12" Padding="0" />
                <c1:C1SlideTile Content="4" Header="C1SlideTile, SlideDirection = Right" HeaderPadding="12" Padding="0" SlideDirection="Right" HorizontalHeaderAlignment="Right" />
                <c1:C1SlideTile Content="5" Header="C1SlideTile" />
                <c1:C1SlideTile ContentSource="{Binding CustomObjects, ElementName=root}" Header="ContentSource" 
                                VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" >
                    <c1:C1SlideTile.ContentTemplate>
                        <DataTemplate>
                            <Grid Background="{Binding Background}">
                                <TextBlock Text="{Binding Header}" 
                                           VerticalAlignment="Center" HorizontalAlignment="Center"
                                           FontSize="18" Foreground="Tomato"/>
                            </Grid>
                        </DataTemplate>
                    </c1:C1SlideTile.ContentTemplate>
                </c1:C1SlideTile>

            </ListBox.Items>
        </ListBox>
    </Grid>
</UserControl>