<Window x:Class="Elwig.Windows.LogWindow"
        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="Fehler-Protokoll - Elwig" Height="600" Width="1000"
        Loaded="Window_Loaded">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="5"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <DataGrid x:Name="EventList" AutoGenerateColumns="False" HeadersVisibility="Column" IsReadOnly="True" GridLinesVisibility="None" SelectionMode="Single"
                  CanUserDeleteRows="False" CanUserResizeRows="False" CanUserAddRows="False"
                  SelectionChanged="EventList_SelectionChanged"
                  Margin="10,10,5,10">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Ebene" Binding="{Binding Event.EntryType}" Width="60"/>
                <DataGridTextColumn Header="Zeitpunkt" Binding="{Binding Event.TimeGenerated, StringFormat='{}{0:dd.MM.yyyy HH:mm:ss}'}" Width="120"/>
                <DataGridTextColumn Header="Gerät" Binding="{Binding Event.MachineName}" Width="120"/>
                <DataGridTextColumn Header="Fehler" Binding="{Binding ExceptionName}" Width="200"/>
                <DataGridTextColumn Header="Beschreibung" Binding="{Binding ExceptionMessage}" Width="200"/>
                <DataGridTextColumn Header="Herkunft" Binding="{Binding Location}" Width="200"/>
            </DataGrid.Columns>
        </DataGrid>

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

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