<UserControl x:Class="PDF_Office.Views.HomePanel.PDFTools.PDFToolItem"
             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:local="clr-namespace:PDF_Office.Views.HomePanel"
             xmlns:convert="clr-namespace:PDF_Office.DataConvert"
             mc:Ignorable="d" 
             x:Name="usercontrol"
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <convert:BoolToVisible x:Key="boolToVisible"/>
        <convert:InvertBoolToVisibleConvert x:Key="invertBoolToVisibleConvert"/>
    </UserControl.Resources>
    <Grid  Margin="1,1,1,1">

        <Border x:Name="BorderExtend" Height="108"  CornerRadius="8" Background="White" BorderThickness="2" 
                Visibility="{Binding ElementName=usercontrol,Path=IsShowConciseContent,Converter={StaticResource invertBoolToVisibleConvert}}">

            <Grid  Background="Transparent" MouseEnter="Border_MouseEnter" MouseLeave="Border_MouseLeave">
                <Grid Margin="10">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"></ColumnDefinition>
                        <ColumnDefinition Width="*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"></RowDefinition>
                        <RowDefinition Height="*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Image VerticalAlignment="Top" Source="{Binding Image}" HorizontalAlignment="Center" Width="28" Height="28" Margin="5,10,5,5" />

                    <TextBlock  Name="TxbTitle" Grid.Column="1" Text="{Binding Title}" 
                                    FontSize="14" FontWeight="SemiBold" Foreground="Black"
                                    VerticalAlignment="Top" Margin="0,15,0,0"></TextBlock>


                    <StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1"  Margin="6,0,6,0">
                        <Grid>
                            <TextBlock Name="ToolInfoBlock" Text="{Binding TitleInfo}"
                                       Foreground="#666666" LineHeight="16"  FontSize="12"  TextWrapping="Wrap" VerticalAlignment="Center" Margin="0,8,0,0"></TextBlock>
                        </Grid>

                    </StackPanel>
                </Grid>
            </Grid>
        </Border>

        <Border x:Name="BorderConcise" Height="64"  CornerRadius="8" Background="White" BorderThickness="2" BorderBrush="#04000000" Visibility="{Binding ElementName=usercontrol,Path=IsShowConciseContent,Converter={StaticResource boolToVisible}}">
            <Grid Background="Transparent" MouseEnter="Border_MouseEnter" MouseLeave="Border_MouseLeave">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid x:Name="GridToolMaskConcise" Grid.ColumnSpan="2" Background="#477EDE" Visibility="Collapsed"/>
                <Image VerticalAlignment="Top" Source="{Binding Image}" HorizontalAlignment="Center" Width="28" Height="28" Margin="5,10,5,5" />
                <TextBlock  Name="TxbTitleConcise" Grid.Column="1" Text="{Binding Title}" FontSize="14" FontWeight="SemiBold" VerticalAlignment="Top" Margin="0,15,0,0"></TextBlock>
            </Grid>
        </Border>
        
    </Grid>
</UserControl>
