<!-- 
  
  MainWindow.xaml - This file is part of Svg2Xaml.

    Copyright (C) 2009,2011 Boris Richter<himself@boris-richter.net>

  ============================================================================
  
  Svg2Xaml is free software; you can redistribute it and/or modify it under 
  the terms of the GNU Lesser General Public License as published by the Free 
  Software Foundation; either version 2.1 of the License, or (at your option) 
  any later version.
    
  Svg2Xaml 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 Lesser General Public License 
  for more details.

  You should have received a copy of the GNU Lesser General Public License 
  along with Svg2Xaml; if not, see http://www.gnu.org/licenses/.

  ============================================================================
 
  $LastChangedRevision$
  $LastChangedDate$
  $LastChangedBy$

-->
<Window x:Class="Svg2XamlBrowser.MainWindow"
        x:Name="this"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:Svg2XamlBrowser"
        Title="Svg2XamlBrowser" 
        Height="480" 
        Width="640"
        Loaded="Window_Loaded"
        Closing="Window_Closing"
        >

  
  <Grid>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="256*"/>
      <ColumnDefinition Width="Auto"/>
      <ColumnDefinition Width="768*"/>
    </Grid.ColumnDefinitions>
    
    <Grid.RowDefinitions>
      <RowDefinition Height="768*"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="256*"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    
    <DockPanel>
      <DockPanel DockPanel.Dock="Top" Margin="0,0,0,2">
        <Button Name="DirectoryButton" 
                DockPanel.Dock="Right"
                Margin="1,0,0,0"
                Width="{Binding ElementName=DirectoryButton,Path=ActualHeight}"
                Click="DirectoryButton_Click"
                />
        <TextBox Name="DirectoryTextBox" Margin="0,0,1,0" KeyDown="DirectoryTextBox_KeyDown"/>
      </DockPanel>
    <TreeView Name="DirectoryTreeView"
              Grid.Column="0" 
              Margin="0,2,0,0"
              SelectedItemChanged="DirectoryTreeView_SelectedItemChanged"
              />
    </DockPanel>
    
    <GridSplitter Grid.Column="1" ResizeBehavior="PreviousAndNext" ResizeDirection="Columns" Width="4"/>

    <DockPanel Grid.Column="2">
      <DockPanel DockPanel.Dock="Top" Margin="0,0,0,2">
        <TextBox Name="ThumbnailSizeTextBox" Text="{Binding ElementName=this,Path=ThumbnailSize}" KeyDown="ThumbnailSizeTextBox_KeyDown" />
      </DockPanel>
      <ListBox Name="DirectoryEntriesListBox"
               Margin="0,2,0,0"
             ScrollViewer.HorizontalScrollBarVisibility="Disabled">
        <ListBox.ItemsPanel>
          <ItemsPanelTemplate>
            <WrapPanel />
          </ItemsPanelTemplate>
        </ListBox.ItemsPanel>
      </ListBox>
    </DockPanel>

    <GridSplitter Grid.Column="0" Grid.ColumnSpan="3"  
                  Grid.Row="1"
                  ResizeBehavior="PreviousAndNext" ResizeDirection="Rows" Height="4"
                 HorizontalAlignment="Stretch" 
                  />

    <ListBox Name="JournalListBox" Grid.Column="0"  Grid.ColumnSpan="3"   Grid.Row="2" />

    <StatusBar Grid.ColumnSpan="3" Grid.Row="3">
      <StatusBarItem DockPanel.Dock="Right" VerticalAlignment="Stretch">
        <ProgressBar Name="StatusProgressBar" Width="128" 
                     Height="{Binding ElementName=StatusTextBlock,Path=ActualHeight}"
                     Visibility="Collapsed"
                     />
      </StatusBarItem>
      
      <StatusBarItem>
        <TextBlock Name="StatusTextBlock" Text=" "/>
      </StatusBarItem>
      
    </StatusBar>
    
  </Grid>
</Window>
