<UserControl x:Class="ynhtm.Upfile.Main"
    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="400" d:DesignWidth="600" xmlns:Upfile="clr-namespace:ynhtm.Upfile" xmlns:ControlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" Loaded="UserControl_Loaded" FontFamily="Verdana" FontSize="12" AllowDrop="True" Drop="UserControl_Drop">

    <Grid Background="#DDD">
        <Grid.RowDefinitions>
            <RowDefinition Height="34" />
            <RowDefinition Height="1" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Border Grid.Row="0" Background="#EEE" Padding="5">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition Width="70" />
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition Width="100" />
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition Width="75"/>
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition Width="75" />
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition Width="60" />
                </Grid.ColumnDefinitions>
                <Button Grid.Column="8" Content="打开文件..." Name="btnOpen" Click="btnOpen_Click" />
                <Button Grid.Column="10" Content="上传"  FontWeight="Bold" Name="btnUpfile" Click="btnUpfile_Click" />
                <CheckBox Grid.Column="2" Content="图片水印" Name="chkPicMask" VerticalAlignment="Center" HorizontalAlignment="Center" Click="chkPicMask_Click" />
                <ComboBox Grid.Column="4" Name="cobRename" SelectionChanged="cobRename_SelectionChanged" />
                <Button Grid.Column="6" Content="新建文件夹" Name="btnCreateDir" Click="btnCreateDir_Click" />
                <ControlsToolkit:WrapPanel Grid.Column="0" Name="navPanel"  Orientation="Horizontal" VerticalAlignment="Center">
                </ControlsToolkit:WrapPanel>
            </Grid>
        </Border>
        <ScrollViewer Grid.Row="2" Name="scrollView" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Background="White" Padding="3" BorderThickness="0">
            <ItemsControl Name="fileList">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Upfile:Item Margin="2" />
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <ControlsToolkit:WrapPanel Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </ScrollViewer>
    </Grid>
</UserControl>
