mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 11:42:22 +08:00
39 lines
1.9 KiB
XML
39 lines
1.9 KiB
XML
<UserControl x:Class="BililiveRecorder.WPF.Controls.LogPanel"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:BililiveRecorder.WPF.Controls"
|
|
xmlns:models="clr-namespace:BililiveRecorder.WPF.Models"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
<ListView ItemsSource="{Binding}" SizeChanged="ListView_SizeChanged"
|
|
VirtualizingPanel.VirtualizationMode="Recycling"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
|
<ListView.DataContext>
|
|
<models:LogModel/>
|
|
</ListView.DataContext>
|
|
<ListView.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="/ModernWpf;component/DensityStyles/Compact.xaml"/>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</ListView.Resources>
|
|
<ListView.View>
|
|
<GridView AllowsColumnReorder="False">
|
|
<GridViewColumn DisplayMemberBinding="{Binding Timestamp,StringFormat=HH:mm:ss.ffff}"/>
|
|
<GridViewColumn DisplayMemberBinding="{Binding Level}"/>
|
|
<GridViewColumn DisplayMemberBinding="{Binding RoomId}"/>
|
|
<GridViewColumn>
|
|
<GridViewColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Message}" TextWrapping="Wrap"/>
|
|
</DataTemplate>
|
|
</GridViewColumn.CellTemplate>
|
|
</GridViewColumn>
|
|
</GridView>
|
|
</ListView.View>
|
|
</ListView>
|
|
</UserControl>
|