<Window
  x:Class="GUI.Views.LogView"
  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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:viewModels="clr-namespace:GUI.ViewModels"
  Title="LogView"
  Width="800"
  Height="450"
  d:DataContext="{d:DesignInstance viewModels:LogViewModel}"
  mc:Ignorable="d">
  <Grid>
    <DataGrid
      AutoGenerateColumns="False"
      IsReadOnly="True"
      ItemsSource="{Binding LoggingCollection.Items}"
      VirtualizingPanel.ScrollUnit="Pixel">
      <DataGrid.Columns>
        <DataGridTextColumn
          Width="Auto"
          MinWidth="120"
          Binding="{Binding Timestamp}"
          Header="Timestamp" />
        <DataGridTextColumn
          Width="*"
          MinWidth="120"
          MaxWidth="300"
          Binding="{Binding Message}"
          Header="Message">
          <DataGridTextColumn.ElementStyle>
            <Style>
              <Setter Property="TextBlock.TextAlignment" Value="Left" />
              <Setter Property="TextBlock.TextWrapping" Value="Wrap" />
            </Style>
          </DataGridTextColumn.ElementStyle>
        </DataGridTextColumn>
      </DataGrid.Columns>
    </DataGrid>
  </Grid>
</Window>