<Window x:Class="Elwig.Windows.MailLogWindow"
        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:local="clr-namespace:Elwig.Windows"
        Title="Ausgangs-Protokoll - Rundschreiben - Elwig" Height="600" Width="1000"
        Loaded="Window_Loaded">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="3*"/>
            <ColumnDefinition Width="5"/>
            <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>

        <TextBox x:Name="FilterInput" Margin="10,10,300,10" Height="25" FontSize="14" Padding="2" TextWrapping="NoWrap"
                 HorizontalAlignment="Stretch" VerticalAlignment="Top"
                 TextChanged="FilterInput_TextChanged"/>

        <ComboBox x:Name="TypeInput" Margin="10,10,165,10" Width="130" Height="25" FontSize="14"
                  HorizontalAlignment="Right" VerticalAlignment="Top"
                  SelectionChanged="TypeInput_SelectionChanged">
            <ComboBoxItem Content="Post &amp; E-Mail" IsSelected="True"/>
            <ComboBoxItem Content="Nur Post"/>
            <ComboBoxItem Content="Nur E-Mail"/>
        </ComboBox>

        <ComboBox x:Name="TimeSpanInput" Margin="10,10,10,10" Width="150" Height="25" FontSize="14"
                  HorizontalAlignment="Right" VerticalAlignment="Top"
                  SelectionChanged="TimeSpanInput_SelectionChanged">
            <ComboBoxItem Content="letzten 7 Tage" IsSelected="True"/>
            <ComboBoxItem Content="letzten 6 Monate"/>
            <ComboBoxItem Content="Immer"/>
        </ComboBox>

        <DataGrid x:Name="MailList" AutoGenerateColumns="False" HeadersVisibility="Column" IsReadOnly="True" GridLinesVisibility="None" SelectionMode="Single"
                  CanUserDeleteRows="False" CanUserResizeRows="False" CanUserAddRows="False"
                  SelectionChanged="MailList_SelectionChanged"
                  Margin="10,40,5,10">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Zeitpunkt" Binding="{Binding DateTime, StringFormat='{}{0:dd.MM.yyyy HH:mm:ss}'}" Width="120"/>
                <DataGridTextColumn Header="Typ" Binding="{Binding Type}" Width="50"/>
                <DataGridTextColumn Header="MgNr." Binding="{Binding MgNr}" Width="50"/>
                <DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="200"/>
                <DataGridTextColumn Header="Adressen" Binding="{Binding Addresses}" Width="200"/>
                <DataGridTextColumn Header="Betreff" Binding="{Binding Subject}" Width="250"/>
                <DataGridTextColumn Header="Anhänge" Binding="{Binding Attachments}" Width="200"/>
            </DataGrid.Columns>
        </DataGrid>

        <GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

        <TextBox x:Name="MailData" Grid.Column="2" Margin="5,10,10,10" IsReadOnly="True"
                 HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible"/>
    </Grid>
</Window>
