BililiveRecorder/BililiveRecorder.WPF/Pages/LogPage.xaml

86 lines
4.6 KiB
Plaintext
Raw Normal View History

2020-11-27 18:51:02 +08:00
<ui:Page
x:Class="BililiveRecorder.WPF.Pages.LogPage"
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:ui="http://schemas.modernwpf.com/2019"
xmlns:wpf="clr-namespace:BililiveRecorder.WPF"
xmlns:local="clr-namespace:BililiveRecorder.WPF.Pages"
xmlns:models="clr-namespace:BililiveRecorder.WPF.Models"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance Type=models:LogModel}"
DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=local:RootPage},Path=DataContext.Logs,Mode=OneWay}"
Title="LogPage">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<ui:ThemeShadowChrome Margin="5">
2020-11-28 13:02:57 +08:00
<Border Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
2020-11-28 05:39:56 +08:00
BorderBrush="{DynamicResource SystemControlBackgroundAccentBrush}"
BorderThickness="1" CornerRadius="5">
2020-11-27 18:51:02 +08:00
<StackPanel Margin="10" Orientation="Vertical">
<StackPanel.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="15"/>
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style TargetType="ui:HyperlinkButton">
<Setter Property="Padding" Value="0"/>
</Style>
<Style TargetType="StackPanel">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Orientation" Value="Horizontal"/>
</Style>
</StackPanel.Resources>
<StackPanel>
<TextBlock Text="B站录播姬 "/>
<TextBlock x:Name="VersionTextBlock"/>
</StackPanel>
<StackPanel>
<TextBlock Text="官网: "/>
<ui:HyperlinkButton Content="https://rec.danmuji.org" NavigateUri="https://rec.danmuji.org"/>
</StackPanel>
<StackPanel>
<TextBlock Text="联系方式/问题反馈: "/>
<ui:HyperlinkButton Content="rec@danmuji.org" NavigateUri="mailto:rec@danmuji.org"/>
</StackPanel>
<TextBlock Text="QQ群: 689636812"/>
</StackPanel>
</Border>
</ui:ThemeShadowChrome>
<ui:ThemeShadowChrome Grid.Row="1" IsShadowEnabled="True" Depth="10" Margin="5">
2020-11-28 13:02:57 +08:00
<Border Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
2020-11-28 05:39:56 +08:00
BorderBrush="{DynamicResource SystemControlBackgroundAccentBrush}"
BorderThickness="1" CornerRadius="5">
2020-11-27 18:51:02 +08:00
<ItemsControl x:Name="Log" ItemsSource="{Binding Mode=OneWay}" Margin="5" ToolTip="右键点击可以复制单行日志">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border BorderThickness="0,0,0,1" BorderBrush="#FFCCCCCC">
<TextBlock Text="{Binding Mode=OneWay}" TextWrapping="Wrap" MouseRightButtonUp="TextBlock_MouseRightButtonUp"/>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.Template>
<ControlTemplate>
<ScrollViewer Loaded="ScrollViewer_Loaded" CanContentScroll="True">
<ItemsPresenter/>
</ScrollViewer>
</ControlTemplate>
</ItemsControl.Template>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel IsItemsHost="True"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</Border>
</ui:ThemeShadowChrome>
</Grid>
</ui:Page>