<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:c1Ext="using:C1.Xaml.Extended">
    
	<!--******************** C1Book ********************-->
    <Style TargetType="c1Ext:C1Book">
        <Setter Property="BorderBrush" Value="{ThemeResource TextBoxBorderThemeBrush}"/>
        <Setter Property="BorderThickness" Value="3"/>
        <Setter Property="ItemsPanel">
			<Setter.Value>
                <ItemsPanelTemplate>
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition />
							<RowDefinition />
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition />
							<ColumnDefinition />
						</Grid.ColumnDefinitions>
					</Grid>
                </ItemsPanelTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1Ext:C1Book">
                    <ItemsPresenter />
                </ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <!-- C1BookItem -->
    <Style TargetType="c1Ext:C1BookItem">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Background" Value="White"/>
       
        <Setter Property="Template">
			<Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <ContentControl x:Name="ContentControl" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <ContentPresenter Content="{TemplateBinding Content}" 
										ContentTemplate="{TemplateBinding ContentTemplate}"
										Margin="{TemplateBinding Padding}" 
										HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
										VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        Foreground="{ThemeResource TextBoxForegroundThemeBrush}"/>
                    </ContentControl>
                </ControlTemplate>
			</Setter.Value>
		</Setter>        
	</Style>
</ResourceDictionary>
