<!-- **************************************************************************

  Copyright (c) 2010 CubeSoft, Inc.

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Affero General Public License as published
  by the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Affero General Public License for more details.

  You should have received a copy of the GNU Affero General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

*************************************************************************** -->
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:fs="clr-namespace:Cube.FileSystem;assembly=Cube.FileSystem"
    xmlns:my="clr-namespace:Cube.Pdf.Editor">

    <!-- **********************************************************************
      Hero
    *********************************************************************** -->
    <Style x:Key="HeroStyle" TargetType="{x:Type Grid}">
        <Setter Property="Background" Value="{StaticResource WindowBackgroundBrush}" />
        <Setter Property="Width" Value="550" />
        <Setter Property="Height" Value="300" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <!-- **********************************************************************
      HeroImage
    *********************************************************************** -->
    <Style x:Key="HeroImageStyle" TargetType="{x:Type Image}">
        <Setter Property="Stretch" Value="Fill" />
    </Style>

    <!-- **********************************************************************
      HeroTitle
    *********************************************************************** -->
    <ControlTemplate x:Key="HeroTitleTemplate" TargetType="{x:Type Button}">
        <TextBlock
            Text="{TemplateBinding Content}"
            FontSize="14"
            FontWeight="Bold"
            HorizontalAlignment="Left"
            VerticalAlignment="Center"
            Width="Auto"
            Margin="8,0,0,0"
            Foreground="{StaticResource WindowForegroundBrush}"
            Cursor="Hand" />
    </ControlTemplate>

    <!-- **********************************************************************
      HeroRecentCollection
    *********************************************************************** -->
    <ControlTemplate x:Key="HeroRecentCollectionTemplate" TargetType="{x:Type ListBox}">
        <WrapPanel
            Margin="6,4,6,0"
            Orientation="Vertical"
            ItemWidth="269"
            ItemHeight="27"
            IsItemsHost="True" />
    </ControlTemplate>

    <!-- **********************************************************************
      HeroRecentItem
    *********************************************************************** -->
    <Style x:Key="HeroRecentItemStyle" TargetType="{x:Type ListBoxItem}">
        <Setter Property="Margin" Value="0,0,3,3" />
    </Style>

    <!-- **********************************************************************
      HeroRecentItem (Template)
    *********************************************************************** -->
    <DataTemplate x:Key="HeroRecentItemTemplate" DataType="{x:Type fs:Information}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="16" />
                <ColumnDefinition Width="6"  />
                <ColumnDefinition Width="*"  />
            </Grid.ColumnDefinitions>

            <Image
                Source="{Binding Converter={my:IconConverter}}"
                Stretch="Uniform" />
            <TextBlock
                Text="{Binding BaseName}"
                TextWrapping="NoWrap"
                TextTrimming="CharacterEllipsis"
                Grid.Column="2" />
        </Grid>
    </DataTemplate>
</ResourceDictionary>