<Window x:Class="Annotations.VB.EditFileAttachmentAnnotationForm"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Annotations.Annotations.VB"
    Title="Edit file attachment annotation" Height="410" Width="300" MinHeight="410" MinWidth="300" MaxHeight="430" MaxWidth="400" WindowStartupLocation="CenterOwner">

    <Window.Resources>
        <local:BoolReverseConverter x:Key="boolReverseConverter"/>
        <local:PDFDeviceColorToSolidColorBrushConverter x:Key="pdfDeviceColorToSolidColorBrushConverter"/>
    </Window.Resources>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--Author-->
        <Label Grid.Row="0" Grid.Column="0" Content="Author:"/>
        <TextBox Grid.Row="0" Grid.Column="1" Margin="2" Text="{Binding Path=FileAttachmentAnnotation.Author}"/>

        <!--Subject-->
        <Label Grid.Row="1" Grid.Column="0" Content="Subject:"/>
        <TextBox Grid.Row="1" Grid.Column="1" Margin="2" Text="{Binding Path=FileAttachmentAnnotation.Subject}"/>

        <!--Contents-->
        <Label Grid.Row="2" Grid.Column="0" Content="Contents:"/>
        <TextBox Grid.Row="2" Grid.Column="1" Margin="2" AcceptsReturn="True" TextWrapping="Wrap" Height="75" Text="{Binding Path=FileAttachmentAnnotation.Contents}"/>

        <!--Icon-->
        <Label Grid.Row="3" Grid.Column="0" Content="Icon:"/>
        <ListBox Grid.Row="3" Grid.Column="1" Margin="2" Height="90" Name="IconsListBox" SelectionChanged="IconListBox_SelectionChanged"/>

        <!--File-->
        <Label Grid.Row="4" Grid.Column="0" Content="File:"/>
        <Grid Grid.Row="4" Grid.Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>

            <TextBox Margin="2" Text="{Binding Path=FileAttachmentAnnotation.FileName}"/>
            <Button Grid.Column="1" Margin="2" Width="30" Content="..." Click="BrowseFile_Click"/>
        </Grid>

        <!--File description-->
        <Label Grid.Row="5" Grid.Column="0" Content="File description:"/>
        <TextBox Grid.Row="5" Grid.Column="1" Margin="2" Height="70" Text="{Binding Path=FileAttachmentAnnotation.Description}"/>

        <!--Ok Cancel-->
        <StackPanel Grid.Row="7" Grid.ColumnSpan="2" Orientation="Horizontal" Width="236">
            <Button Height="24" Width="110" Margin="4" Content="OK" Click="Ok_Click"/>
            <Button Height="24" Width="110" Margin="4" Content="Cancel" Click="Cancel_Click"/>
        </StackPanel>
    </Grid>
</Window>