<UserControl
    x:Class="BDU.Views.LogArea"
    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:BDU.Views"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="450"
    d:DesignWidth="800"
    Loaded="UserControl_Loaded"
    mc:Ignorable="d">
    <Grid>
        <GroupBox
            Grid.Row="3"
            Grid.Column="2"
            Header="系统运行日志">
            <ListView
                x:Name="LogListView"
                FontWeight="DemiBold"
                ItemsSource="{Binding LogEntries}"
                ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <TextBlock
                            Foreground="{Binding Color}"
                            Text="{Binding Message}"
                            TextWrapping="Wrap" />
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </GroupBox>
    </Grid>
</UserControl>
