<Window x:Class="ZipSamples.DemoZip"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" WindowState="Maximized" 
        Title="MainWindow" Height="600" Width="525">
    <Grid Name="LayoutRoot" >
        <Grid Name="_mainpage" Margin="10">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <c1:C1ProgressBar Width="400" Grid.ColumnSpan="3" Grid.RowSpan="4" Height="70"   Canvas.ZIndex="10"  x:Name="progressBar" HorizontalAlignment="Center" VerticalAlignment="Center" IndeterminateForeground="#FFB1356B" IsIndeterminate="True" Visibility="Collapsed"/>

            <StackPanel Grid.Row="0" Margin="10" Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
                <TextBlock Text="Compress:" VerticalAlignment="Center" Margin="0,0,20,0" FontSize="16"/>
                <Button Name="_btnPickSingleFolder" Content="Pick Folder.." Margin="0,0,20,0" Click="_btnPickFolder_Click"/>
                <Button Name="_btnPickFiles" Content="Pick Files.." Margin="0,0,20,0" Click="_btnPickFiles_Click"/>
                <Button Name="_btnCompress"   Content="Compress.." Click="_btnCompress_Click" IsEnabled="False"/>
            </StackPanel>

            <StackPanel Grid.Row="1" Grid.Column="2" Orientation="Horizontal" Margin="10"  VerticalAlignment="Center" >
                <TextBlock Text="Extract:" VerticalAlignment="Center" Margin="0,0,43,0" FontSize="16" />
                <Button Name="_btnOpen" Content="Open Zip..." Margin="0,0,20,0" Click="_btnOpen_Click" />
                <Button Name="_btnExtract" Content="Extract All..." Click="_btnExtract_Click" IsEnabled="False"/>
            </StackPanel>

            <StackPanel Grid.Row="2" Grid.Column="2" Orientation="Horizontal" Margin="10" VerticalAlignment="Center" HorizontalAlignment="Right" >
                <Button Name="_btnRemove" Content="Remove" Click="_btnRemove_Click" Margin="0,0,20,0" IsEnabled="False" />
                <Button Name="_btnView" Content="View" Click="_btnView_Click" Margin="0,0,20,0" IsEnabled="False"/>
                <Button Name="_btnClear" Content="Clear" Click="_btnClear_Click" Margin="0" />
            </StackPanel>
            <c1:C1FlexGrid BorderBrush="Gray" BorderThickness="1" IsReadOnly="True"
            Name="_flex"
            Grid.Row="3"
            SelectionMode="Row"
            HeadersVisibility="Column"
            AllowResizing="Columns"
            HeaderGridLinesBrush="Transparent"
            AutoGenerateColumns="False" >
                <c1:C1FlexGrid.Columns>
                    <c1:Column Binding="{Binding FileName}" Header="Name" Width="300"/>
                    <c1:Column Binding="{Binding Date}" Header="Date" Format="d" />
                    <c1:Column Binding="{Binding SizeUncompressedLong}" Header="Size" Format="n0" />
                    <c1:Column Binding="{Binding SizeCompressedLong}" Header="Compressed" Format="n0" />
                    <c1:Column Binding="{Binding CompressionRatio}" Header="Ratio" Format="p0" />
                    <c1:Column Binding="{Binding CRC32}" Header="CRC" Format="x0" />
                    <c1:Column Binding="{Binding Attributes}" Header="Attributes" />
                </c1:C1FlexGrid.Columns>
            </c1:C1FlexGrid>
        </Grid>
        <Grid 
            Name="_preview"
            Grid.RowSpan="4" 
            Visibility="Collapsed" >
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition />
            </Grid.RowDefinitions>

            <Grid Margin="0 0 0 20">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="C1Zip Preview" FontSize="28" Margin="0 0 40 0"/>
                <Button Grid.Column="1" Name="_btnClosePreview" Content="Close" Click="_btnClosePreview_Click_1" HorizontalAlignment="Right" Margin="0" Width="106"/>
            </Grid>

            <TextBox 
                Grid.Row="1" 
                Name="_tbContent" 
                IsReadOnly="True" 
                AcceptsReturn="True" 
                FontFamily="Courier New" 
                Background="White" />
        </Grid>

    </Grid>
   
</Window>
