实现提供了完整的弹幕功能,包括多行显示、不同颜色、头像支持、防重叠、椭圆形边框、透明度渐变、点击事件、字体样式设置、暂停/继续功能、过滤功能等。还包含了批处理队列处理逻辑、速率限制、错误处理和性能监控等功能。
This commit is contained in:
29
YwxAppWpfDanMu/Controls/DanMuItem.xaml
Normal file
29
YwxAppWpfDanMu/Controls/DanMuItem.xaml
Normal file
@@ -0,0 +1,29 @@
|
||||
<UserControl x:Class="YwxAppWpfDanMu.Controls.DanMuItem"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="60" d:DesignWidth="200">
|
||||
<Grid>
|
||||
<Border x:Name="Border" CornerRadius="15" Background="#88000000" Padding="3">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Ellipse Width="30" Height="30" Grid.Column="0" Margin="0,0,3,0">
|
||||
<Ellipse.Fill>
|
||||
<ImageBrush x:Name="AvatarBrush" Stretch="UniformToFill"/>
|
||||
</Ellipse.Fill>
|
||||
</Ellipse>
|
||||
|
||||
<TextBlock x:Name="ContentText" Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
TextWrapping="NoWrap"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user