实现提供了完整的弹幕功能,包括多行显示、不同颜色、头像支持、防重叠、椭圆形边框、透明度渐变、点击事件、字体样式设置、暂停/继续功能、过滤功能等。还包含了批处理队列处理逻辑、速率限制、错误处理和性能监控等功能。
This commit is contained in:
28
WpfApp1/MainWindow.xaml
Normal file
28
WpfApp1/MainWindow.xaml
Normal file
@@ -0,0 +1,28 @@
|
||||
<Window x:Class="WpfApp1.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:danmu="clr-namespace:YwxAppWpfDanMu.Controls;assembly=YwxAppWpfDanMu"
|
||||
mc:Ignorable="d"
|
||||
Title="弹幕演示" Height="450" Width="800">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="3*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<danmu:DanMuControl x:Name="DanMuControl" Grid.Row="0" LineCount="10" />
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Content="暂停" Width="80" Margin="5" Click="PauseButton_Click"/>
|
||||
<Button Content="继续" Width="80" Margin="5" Click="ResumeButton_Click"/>
|
||||
<Button Content="清空" Width="80" Margin="5" Click="ClearButton_Click"/>
|
||||
<Button Content="添加测试" Width="80" Margin="5" Click="Button_Click"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user