<UserControl x:Class="ynhtm.Upfile.Item"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="150" d:DesignWidth="130" Height="150" Width="130" xmlns:Lib="clr-namespace:ynhtm.Upfile.Lib" Loaded="UserControl_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="2"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="2"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Border Grid.Row="0" Name="border" BorderBrush="#EEE" BorderThickness="1" CornerRadius="5" MouseEnter="bordBg_MouseEnter" MouseLeave="bordBg_MouseLeave">
            <Grid>
                <Lib:HyperlinkButton x:Name="lnkPic" Padding="5" NavigateUri="{Binding Url,Mode=OneWay}" TargetName="_blank" Clicking="lnkPic_Clicking" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
                    <Image Stretch="{Binding Stretch,Mode=OneWay}" Source="{Binding Source,Mode=OneWay}" />
                </Lib:HyperlinkButton>
                <Border Name="bordText" CornerRadius="3" Padding="3,2" HorizontalAlignment="Center" VerticalAlignment="Center">
                    <TextBlock Text="{Binding Text,Mode=OneWay}" Foreground="White" />
                </Border>
                <Border Width="14" Height="14" Background="White" CornerRadius="3" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,5,5,0">
                    <Border Name="bordDelete" Background="Red" CornerRadius="3">
                        <HyperlinkButton ToolTipService.ToolTip="删除" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Click="lnkDelete_Click" MouseEnter="lnkDelete_MouseEnter" MouseLeave="lnkDelete_MouseLeave">
                            <Image Source="./Images/Del.png" Stretch="None" />
                        </HyperlinkButton>
                    </Border>
                </Border>
            </Grid>
        </Border>
        <TextBlock Grid.Row="2" ToolTipService.ToolTip="{Binding Name,Mode=OneWay}" Text="{Binding Name,Mode=OneWay}" TextAlignment="Center" VerticalAlignment="Center" TextWrapping="NoWrap" TextTrimming="WordEllipsis" />
        <TextBlock Grid.Row="4" Foreground="#999" Text="{Binding Info,Mode=OneWay}" TextAlignment="Center" VerticalAlignment="Center" TextWrapping="NoWrap" />
    </Grid>
</UserControl>
