<UserControl x:Class="TestingModule.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:prism="http://prismlibrary.com/"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             d:DesignHeight="450"
             d:DesignWidth="800">

    <Grid>
        <GroupBox Header="系统运行日志">
            <ListView x:Name="LogListView"
                FontWeight="DemiBold"
                      ItemsSource="{Binding Logs}"
                      ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                <ListView.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="清空日志"
                                  Command="{Binding ClearLogCommand}" />
                    </ContextMenu>
                </ListView.ContextMenu>
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Foreground="{Binding Color}"
                                   Text="{Binding Message}"
                                   TextWrapping="Wrap" />
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </GroupBox>
    </Grid>
</UserControl>
