<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="ExtendedSamples.DemoBook" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:local="clr-namespace:ExtendedSamples" xmlns:helpers="clr-namespace:Helpers">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/ExtendedSamples.4;component/CommonResources.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <!-- Control instance -->
    <Border Grid.Row="1" Style="{DynamicResource control_Border}">
        <Grid>
            <TextBlock Name="notSupportedTb" Text="Sorry, C1Book doesn't support a partial trust environment." Style="{DynamicResource captionStyle}" Visibility="Collapsed" HorizontalAlignment="Center" FontSize="15" />
            <c1:C1Book x:Name="book" Visibility="Collapsed">
                <c1:C1Book.LeftPageTemplate>
                    <ControlTemplate TargetType="ContentControl">
                        <Border Background="WhiteSmoke" BorderBrush="WhiteSmoke" BorderThickness="10 10 0 10">
                            <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}" />
                        </Border>
                    </ControlTemplate>
                </c1:C1Book.LeftPageTemplate>
                <c1:C1Book.RightPageTemplate>
                    <ControlTemplate TargetType="ContentControl">
                        <Border Background="WhiteSmoke" BorderBrush="WhiteSmoke" BorderThickness="10 10 0 10">
                            <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}" />
                        </Border>
                    </ControlTemplate>
                </c1:C1Book.RightPageTemplate>
                <c1:C1Book.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.Background>
                                <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                                    <GradientStop Color="#FFE2E8EB" Offset="0.2" />
                                    <GradientStop Color="#FFEEF4F7" Offset="0.3" />
                                    <GradientStop Color="#FFE2E8EB" Offset="0.4" />
                                </LinearGradientBrush>
                            </Grid.Background>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Image Source="{Binding Path=CoverUri}" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="1" />
                            <TextBlock Text="{Binding Path=Title}" TextWrapping="Wrap" TextAlignment="Left" FontSize="11" FontWeight="Bold" Margin="10,7,10,10" Foreground="#FF22445F" />
                            <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2" Grid.RowSpan="1" Margin="10,7,10,10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <TextBlock HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Text="{Binding Path=Price}" TextWrapping="NoWrap" Grid.ColumnSpan="1" Grid.Row="1" Grid.Column="1" FontSize="11" Foreground="#FF086C8E" FontWeight="Bold" />
                                <TextBlock HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Text="{Binding Path=Id}" Grid.ColumnSpan="1" Grid.Column="1" TextWrapping="NoWrap" FontSize="11" Foreground="#FF383838" />
                                <TextBlock Text="Book Code:" TextWrapping="NoWrap" FontSize="11" Foreground="#FF383838" />
                                <TextBlock Text="Price:" TextWrapping="NoWrap" Grid.Row="1" Margin="0,4,0,2" FontSize="11" Foreground="#FF383838" />
                            </Grid>
                        </Grid>
                    </DataTemplate>
                </c1:C1Book.ItemTemplate>
            </c1:C1Book>
        </Grid>
    </Border>
</UserControl>