加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
MainWindow.xaml 68.11 KB
一键复制 编辑 原始数据 按行查看 历史
Hamm 提交于 2020-10-22 00:22 . fix: 头像部分的问题
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822
<Window x:Class="BBBUG.COM.MainWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BBBUG.COM"
mc:Ignorable="d"
Title="BBBUG音乐聊天室" Height="666" Width="1000" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowsTransparency="True" Background="Transparent" OpacityMask="White" Closing="MainWindowClosing" >
<Window.Effect>
<DropShadowEffect BlurRadius="10" Color="#ccc" Direction="100" ShadowDepth="0"/>
</Window.Effect>
<Window.Resources>
<!--#region -->
<!-- ScrollViewer 滚动条 -->
<Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Grid>
<!--滚动条颜色-->
<Border Background="#666" CornerRadius="5"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Opacity" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Opacity" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--滚动条上下按钮-->
<Style x:Key="VerticalScrollBarPageButton2" TargetType="{x:Type RepeatButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Opacity" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<Rectangle Fill="#90000000" Width="0" Height="0"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="for_scrollbar" TargetType="{x:Type ScrollBar}">
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Margin" Value="0,1,1,6"/>
<Setter Property="Width" Value="8"/>
<Setter Property="MinWidth" Value="5"/>
<Setter Property="Opacity" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollBar}">
<Grid x:Name="Bg" SnapsToDevicePixels="true">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
</Grid.RowDefinitions>
<RepeatButton Grid.Row="0" Style="{StaticResource VerticalScrollBarPageButton2}" Command="{x:Static ScrollBar.PageUpCommand}"/>
<Track x:Name="PART_Track" Grid.Row="1" IsEnabled="{TemplateBinding IsMouseOver}" IsDirectionReversed="true">
<Track.DecreaseRepeatButton>
<RepeatButton Style="{StaticResource VerticalScrollBarPageButton}" Command="{x:Static ScrollBar.PageUpCommand}"/>
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Style="{StaticResource VerticalScrollBarPageButton}" Command="{x:Static ScrollBar.PageDownCommand}"/>
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource ScrollBarThumb}"/>
</Track.Thumb>
</Track>
<RepeatButton Grid.Row="2" Style="{StaticResource VerticalScrollBarPageButton2}" Command="{x:Static ScrollBar.PageDownCommand}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="Orientation" Value="Horizontal">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Margin" Value="1,0,6,1"/>
<Setter Property="Height" Value="5"/>
<Setter Property="MinHeight" Value="5"/>
<Setter Property="Width" Value="Auto"/>
<Setter Property="Opacity" Value="0.1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollBar}">
<Grid x:Name="Bg" SnapsToDevicePixels="true">
<Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
<Track.DecreaseRepeatButton>
<RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}" Command="{x:Static ScrollBar.PageLeftCommand}"/>
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}" Command="{x:Static ScrollBar.PageRightCommand}"/>
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource ScrollBarThumb}"/>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="for_scrollviewer"
TargetType="{x:Type ScrollViewer}">
<Setter Property="BorderBrush" Value="#eee"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollViewer}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
<Grid Background="{TemplateBinding Background}">
<ScrollContentPresenter Cursor="{TemplateBinding Cursor}" Margin="{TemplateBinding Padding}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
<ScrollBar x:Name="PART_VerticalScrollBar"
HorizontalAlignment="Right"
Maximum="{TemplateBinding ScrollableHeight}"
Orientation="Vertical"
Style="{StaticResource for_scrollbar}"
ViewportSize="{TemplateBinding ViewportHeight}"
Value="{TemplateBinding VerticalOffset}"
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
<ScrollBar x:Name="PART_HorizontalScrollBar"
Maximum="{TemplateBinding ScrollableWidth}"
Orientation="Horizontal"
Style="{StaticResource for_scrollbar}"
VerticalAlignment="Bottom"
Value="{TemplateBinding HorizontalOffset}"
ViewportSize="{TemplateBinding ViewportWidth}"
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="ScrollChanged" >
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="PART_VerticalScrollBar"
Storyboard.TargetProperty="Opacity"
To="0.8"
Duration="0:0:1"/>
<DoubleAnimation
Storyboard.TargetName="PART_VerticalScrollBar"
Storyboard.TargetProperty="Opacity"
To="0"
Duration="0:0:1"
BeginTime="0:0:1"/>
<DoubleAnimation
Storyboard.TargetName="PART_HorizontalScrollBar"
Storyboard.TargetProperty="Opacity"
To="0.8"
Duration="0:0:1"/>
<DoubleAnimation
Storyboard.TargetName="PART_HorizontalScrollBar"
Storyboard.TargetProperty="Opacity"
To="0"
Duration="0:0:1"
BeginTime="0:0:1"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseEnter"
SourceName="PART_VerticalScrollBar">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="PART_VerticalScrollBar"
Storyboard.TargetProperty="Opacity"
To="0.8"
Duration="0:0:0.7"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseLeave"
SourceName="PART_VerticalScrollBar">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="PART_VerticalScrollBar"
Storyboard.TargetProperty="Opacity"
To="0"
Duration="0:0:0.7"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseEnter"
SourceName="PART_HorizontalScrollBar">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="PART_HorizontalScrollBar"
Storyboard.TargetProperty="Opacity"
To="0.8"
Duration="0:0:0.7"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseLeave"
SourceName="PART_HorizontalScrollBar">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="PART_HorizontalScrollBar"
Storyboard.TargetProperty="Opacity"
To="0"
Duration="0:0:0.9"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--默认ScrollBar-->
<Style TargetType="ScrollBar" BasedOn="{StaticResource for_scrollbar}"/>
<!--默认ScrollView-->
<Style TargetType="ScrollViewer" BasedOn="{StaticResource for_scrollviewer}"/>
<!--#endregion-->
<Style x:Key="MessageStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Grid x:Name="grid" Margin="20,10,10,10">
<!-- 别人发的消息 -->
<Grid Visibility="{Binding fromOther}">
<Border Width="50" Height="50" CornerRadius="8" BorderBrush="White" BorderThickness="0" VerticalAlignment="Top" HorizontalAlignment="Left" >
<Border.Background>
<ImageBrush ImageSource="{Binding user_head}"/>
</Border.Background>
</Border>
<TextBlock Text="{Binding user_name}" Margin="60,0,0,0" FontSize="14" HorizontalAlignment="Left" Foreground="#333"/>
<Viewbox Stretch="None" HorizontalAlignment="Left" Margin="60,30,20,10" VerticalAlignment="Bottom" Visibility="{Binding isText}">
<Border CornerRadius="5" Background="#e5e5e5" Padding="10,10,10,10" >
<TextBlock TextWrapping = "Wrap" Foreground="#666" MaxWidth="300" Text="{Binding message_content}" TextTrimming="CharacterEllipsis" FontSize="14" Margin="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
</Border>
</Viewbox>
<Border CornerRadius="5" Margin="60,20,20,10" HorizontalAlignment="Left" Background="#f5f5f5" Visibility="{Binding isPicture}">
<Image Cursor="Hand" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" ToolTip="点击查看大图"
Width="{Binding RelativeSource={RelativeSource Self}, Path=Source.PixelWidth}"
Height="{Binding RelativeSource={RelativeSource Self}, Path=Source.PixelHeight}" MaxWidth="300" MaxHeight="300" VerticalAlignment="Top" Stretch="Uniform"
Source="{Binding message_content}"
Margin="5"/>
</Border>
<Label Margin="-5,55,0,0" Width="60" HorizontalContentAlignment="Center" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="12" Foreground="#aaa" Content="{Binding message_time}"></Label>
</Grid>
<!-- 我发送的消息 -->
<Grid Visibility="{Binding fromMe}">
<Border Margin="0,0,10,0" Width="50" Height="50" CornerRadius="8" BorderBrush="White" BorderThickness="0" VerticalAlignment="Top" HorizontalAlignment="Right" >
<Border.Background>
<ImageBrush ImageSource="{Binding user_head}"/>
</Border.Background>
</Border>
<TextBlock Text="{Binding user_name}" Margin="0,0,70,0" FontSize="14" HorizontalAlignment="Right" Foreground="#333"/>
<Viewbox Stretch="None" HorizontalAlignment="Right" Margin="20,30,70,10" Visibility="{Binding isText}">
<Border CornerRadius="5" Background="#666" Padding="10,10,10,10" >
<TextBlock TextWrapping = "Wrap" Foreground="#fff" MaxWidth="300" Text="{Binding message_content}" TextTrimming="CharacterEllipsis" FontSize="14" Margin="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
</Border>
</Viewbox>
<Border CornerRadius="5" Margin="20,30,70,0" HorizontalAlignment="Right" Padding="5" Background="#f5f5f5" Visibility="{Binding isPicture}">
<Image Cursor="Hand" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" ToolTip="点击查看大图"
Width="{Binding RelativeSource={RelativeSource Self}, Path=Source.PixelWidth}"
Height="{Binding RelativeSource={RelativeSource Self}, Path=Source.PixelHeight}" MaxWidth="300" MaxHeight="300" VerticalAlignment="Top" Stretch="Uniform"
Source="{Binding message_content}"
Margin="5"/>
</Border>
<Label Margin="0,55,5,0" Width="60" HorizontalContentAlignment="Center" VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="12" Foreground="#aaa" Content="{Binding message_time}"></Label>
</Grid>
<!-- 系统消息 -->
<Grid Visibility="{Binding fromSystem}" >
<Viewbox Stretch="None" HorizontalAlignment="Center">
<Border CornerRadius="3" Background="#ddd" Padding="10,3" >
<TextBlock TextWrapping = "Wrap" Foreground="#aaa" Text="{Binding message_content}" TextTrimming="CharacterEllipsis" FontSize="12" Margin="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Viewbox>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<!--
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="grid" Property="Background" Value="#fceeb9"/>
</Trigger>
<Trigger Property="Selector.IsSelected" Value="true">
<Setter TargetName="grid" Property="Background" Value="#fae388"/>
</Trigger>
-->
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="RoomListStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Grid x:Name="grid" Margin="5,5,5,5" Width="335" Cursor="Hand">
<Border CornerRadius="5" Background="#fff" Padding="10,10,10,10" HorizontalAlignment="Stretch" Margin="0,0,0,1" VerticalAlignment="Stretch" >
<Grid>
<Border Margin="0,0,10,0" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" Width="60" Height="60" CornerRadius="8" BorderBrush="White" BorderThickness="0" VerticalAlignment="Top" HorizontalAlignment="Left" >
<Border.Background>
<ImageBrush ImageSource="{Binding user_head}" RenderOptions.BitmapScalingMode="HighQuality"/>
</Border.Background>
</Border>
<StackPanel Orientation="Horizontal" Margin="70,0,70,0" HorizontalAlignment="Left">
<TextBlock Text="{Binding room_name}" FontSize="14" Foreground="#333" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
<TextBlock Margin="0,0,5,0" FontWeight="Bold" Text="{Binding room_online}" FontSize="14" Foreground="#ff4500" Visibility="{Binding showOnline}"/>
</StackPanel>
<Viewbox Stretch="None" HorizontalAlignment="Right" Margin="0,0,0,0" VerticalAlignment="Top">
<Border CornerRadius="5" Background="#f5f5f5" Padding="5,2,5,2" >
<StackPanel Orientation="Horizontal" Margin="0,0,0,0" HorizontalAlignment="Right">
<TextBlock TextWrapping = "Wrap" Foreground="#999" Text="ID: " TextTrimming="CharacterEllipsis" FontSize="12" Margin="0"/>
<TextBlock TextWrapping = "Wrap" Foreground="#999" Text="{Binding room_id}" TextTrimming="CharacterEllipsis" FontSize="12" Margin="0"/>
</StackPanel>
</Border>
</Viewbox>
<StackPanel Orientation="Horizontal" Margin="70,25,10,0" HorizontalAlignment="Left">
<TextBlock Text="{Binding user_name}" FontSize="14" Foreground="#333"/>
</StackPanel>
<TextBlock Text="{Binding room_notice}" Margin="70,45,0,0" FontSize="12" Foreground="#aaa" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<!--
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="grid" Property="Background" Value="#fceeb9"/>
</Trigger>
<Trigger Property="Selector.IsSelected" Value="true">
<Setter TargetName="grid" Property="Background" Value="#fae388"/>
</Trigger>
-->
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SearchSongStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Grid x:Name="grid" Margin="5,5,5,5" Width="335">
<Border CornerRadius="5" Background="#fff" Padding="10,10,10,10" HorizontalAlignment="Stretch" Margin="0,0,0,1" VerticalAlignment="Stretch" >
<Grid>
<StackPanel Orientation="Horizontal" Margin="00,0,70,0" HorizontalAlignment="Left">
<TextBlock Text="{Binding name}" FontSize="14" Foreground="#333" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="00,30,70,0" HorizontalAlignment="Left">
<TextBlock Text="歌手: " FontSize="12" Foreground="#999" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
<TextBlock Text="{Binding singer}" FontSize="12" Foreground="#999" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
</StackPanel>
<Viewbox Stretch="None" HorizontalAlignment="Right" Margin="0,10,0,0" VerticalAlignment="Top">
<Border CornerRadius="5" Background="#eee" Padding="10,5" >
<StackPanel Orientation="Horizontal" Margin="0,0,0,0" HorizontalAlignment="Right">
<TextBlock MouseUp="PickSong" Cursor="Hand" Foreground="#666" Text="点" FontSize="12" Margin="0"/>
</StackPanel>
</Border>
</Viewbox>
</Grid>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="PickedSongStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Grid x:Name="grid" Margin="5,5,5,5" Width="335">
<Border CornerRadius="5" Background="#fff" Padding="10,10,10,10" HorizontalAlignment="Stretch" Margin="0,0,0,1" VerticalAlignment="Stretch" >
<Grid>
<StackPanel Orientation="Horizontal" Margin="00,0,70,0" HorizontalAlignment="Left">
<TextBlock Text="{Binding name}" FontSize="14" Foreground="#333" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="00,30,70,0" HorizontalAlignment="Left">
<TextBlock Text="点歌人: " FontSize="12" Foreground="#999" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
<TextBlock Text="{Binding pickerName}" FontSize="12" Foreground="#999" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
<TextBlock Text="歌手: " FontSize="12" Foreground="#999" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled" Margin="10,0,0,0"
TextTrimming="CharacterEllipsis"/>
<TextBlock Text="{Binding singer}" FontSize="12" Foreground="#999" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
</StackPanel>
<Viewbox Stretch="None" HorizontalAlignment="Right" Margin="0,0,0,0" VerticalAlignment="Top">
<Grid>
<StackPanel Orientation="Horizontal" Margin="0,0,0,0" HorizontalAlignment="Right">
<Border CornerRadius="5" Background="#eee" Padding="10,5" Margin="5,0,0,0" Visibility="{Binding showDelete}">
<StackPanel Orientation="Horizontal" Margin="0,0,0,0" HorizontalAlignment="Right">
<TextBlock MouseUp="DeleteSong" Cursor="Hand" Foreground="#666" Text="删" FontSize="12" Margin="0" ToolTip="删掉这首歌" />
</StackPanel>
</Border>
<Border CornerRadius="5" Background="#67C23A" Padding="10,5" Margin="5,0,0,0">
<StackPanel Orientation="Horizontal" Margin="0,0,0,0" HorizontalAlignment="Right">
<TextBlock MouseUp="PushSong" Cursor="Hand" Foreground="#fff" Text="顶" FontSize="12" Margin="0" ToolTip="顶上去"/>
</StackPanel>
</Border>
</StackPanel>
</Grid>
</Viewbox>
</Grid>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MySongStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Grid x:Name="grid" Margin="5,5,5,5" Width="335">
<Border CornerRadius="5" Background="#fff" Padding="10,10,10,10" HorizontalAlignment="Stretch" Margin="0,0,0,1" VerticalAlignment="Stretch" >
<Grid>
<StackPanel Orientation="Horizontal" Margin="00,0,70,0" HorizontalAlignment="Left">
<TextBlock Text="{Binding name}" FontSize="14" Foreground="#333" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="00,30,70,0" HorizontalAlignment="Left">
<TextBlock Text="点过: " FontSize="12" Foreground="#999" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
<TextBlock Text="{Binding played}" FontSize="12" Foreground="#999" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
<TextBlock Text="次 歌手: " FontSize="12" Foreground="#999" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
<TextBlock Text="{Binding singer}" FontSize="12" Foreground="#999" HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
TextTrimming="CharacterEllipsis"/>
</StackPanel>
<Viewbox Stretch="None" HorizontalAlignment="Right" Margin="0,0,0,0" VerticalAlignment="Top">
<Grid>
<StackPanel Orientation="Horizontal" Margin="0,0,0,0" HorizontalAlignment="Right">
<Border CornerRadius="5" Background="#eee" Padding="10,5" Margin="5,0,0,0" >
<StackPanel Orientation="Horizontal" Margin="0,0,0,0" HorizontalAlignment="Right">
<TextBlock MouseUp="DeleteMySong" Cursor="Hand" Foreground="#666" Text="删" FontSize="12" Margin="0" ToolTip="从你的最爱列表删除" />
</StackPanel>
</Border>
<Border CornerRadius="5" Background="#67C23A" Padding="10,5" Margin="5,0,0,0">
<StackPanel Orientation="Horizontal" Margin="0,0,0,0" HorizontalAlignment="Right">
<TextBlock MouseUp="PickMySong" Cursor="Hand" Foreground="#fff" Text="点" FontSize="12" Margin="0" ToolTip="点歌"/>
</StackPanel>
</Border>
</StackPanel>
</Grid>
</Viewbox>
</Grid>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<Border CornerRadius="10" Background="#ddd" Margin="10,10,10,10"/>
<Border CornerRadius="5,0,0,5" Background="#333333" Margin="10,10,0,10" Width="80" HorizontalAlignment="Left" MouseDown="Border_MouseDown"/>
<Grid>
<Image Source="Images/menubar_picksong.png" Stretch="Fill" Margin="34,150,0,0" Height="32" Width="32" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" VerticalAlignment="Top" HorizontalAlignment="Left" Cursor="Hand" ToolTip="我要点歌" MouseUp="ShowSearchSongBoxClicked"/>
<Image Source="Images/menubar_pickedsong.png" Stretch="Fill" Margin="34,210,0,0" Height="32" Width="32" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" VerticalAlignment="Top" HorizontalAlignment="Left" Cursor="Hand" ToolTip="已点歌曲列表" MouseUp="ShowPickedSongBoxClicked"/>
<Image Source="Images/menubar_mysong.png" Stretch="Fill" Margin="34,270,0,0" Height="32" Width="32" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" VerticalAlignment="Top" HorizontalAlignment="Left" Cursor="Hand" ToolTip="我点过的歌曲" MouseUp="ShowMySongBoxClicked"/>
<Image Source="Images/menubar_selectroom.png" Stretch="Fill" Margin="34,330,0,0" Height="32" Width="32" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" VerticalAlignment="Top" HorizontalAlignment="Left" Cursor="Hand" ToolTip="房间列表" MouseUp="ShowSelectRoomBoxClicked"/>
<Image Source="Images/menubar_setting.png" Stretch="Fill" Margin="34,0,0,34" Height="32" Width="32" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" VerticalAlignment="Bottom" HorizontalAlignment="Left" Cursor="Hand" ToolTip="设置" MouseUp="SettingClicked"/>
<Border Cursor="Hand" ToolTip="修改我的资料" Width="50" Height="50" CornerRadius="8" BorderBrush="White" BorderThickness="0" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="25,67,0,0" MouseUp="MyHeadImageClicked" >
<Image Name="my_head_img" Width="50" Height="50" Source="Images/nohead.jpg"></Image>
</Border>
</Grid>
<Grid>
<Image ToolTip="退出,后会有期" Cursor="Hand" Source="Images/23.png" Stretch="Fill" Margin="16,19,0,0" Height="20" Width="20" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" VerticalAlignment="Top" HorizontalAlignment="Left" MouseUp="Image_Close_Clicked"/>
<Image ToolTip="最小化,老板来了快跑呀" Cursor="Hand" Source="Images/9.png" Stretch="Fill" Margin="40,19,0,0" Height="20" Width="20" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" VerticalAlignment="Top" HorizontalAlignment="Left" MouseUp="Image_MiniScreen_Clicked"/>
<Image ToolTip="播放器,老板来了又如何!" Cursor="Hand" Source="Images/28.png" Stretch="Fill" Margin="64,19,0,0" Height="20" Width="20" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" VerticalAlignment="Top" HorizontalAlignment="Left" MouseUp="Image_FullScreen_Click"/>
</Grid>
<Grid>
<Border CornerRadius="0,5,0,0" Height="45" Margin="90,10,10,0" VerticalAlignment="Top" Background="#F5F5F5" Padding="20,15,10,10" MouseDown="Border_MouseDown" Cursor="SizeAll">
<StackPanel Orientation="Horizontal" Margin="0,0,70,0" HorizontalAlignment="Left">
<TextBlock Text="ID:" FontSize="16" Background="Transparent" Foreground="#ff4500" Margin="0,0,0,0" Padding="0" />
<TextBlock Name="room_id" Text="888" FontSize="16" Background="Transparent" Foreground="#ff4500" Margin="0,0,0,0" Padding="0" />
<TextBlock Name="room_title" Text="BBBUG聊天室" FontSize="16" Background="Transparent" Foreground="#333333" Margin="10,0,0,0" Padding="0" />
</StackPanel>
</Border>
<Border Background="#F5F5F5" Margin="90,56,10,111" Padding="0,0,0,40" MouseUp="HideAllBoxClicked">
<ListBox BorderThickness="0" ItemContainerStyle="{StaticResource MessageStyle}" x:Name="message_list" BorderBrush="#eaeaeb" Background="Transparent" Margin="0,0,0,0 ">
<ListBox.Style>
<Style TargetType="{x:Type ListBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0">
<ScrollViewer Focusable="False">
<ItemsPresenter />
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.Style>
</ListBox>
</Border>
<Grid>
<Grid Margin="100,10,10,120" VerticalAlignment="Bottom" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
<Image Cursor="Hand" ToolTip="Emoji" Margin="0" Source="Images/button_emoji.png" Stretch="Fill" Height="32" VerticalAlignment="Center" Width="32" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="ShowEmojiBox"/>
<Image Cursor="Hand" ToolTip="发送图片" Margin="10,0" Source="Images/img-circle.png" Stretch="Fill" Height="28" VerticalAlignment="Center" Width="28" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True"/>
</StackPanel>
</Grid>
<Border Background="#fff" CornerRadius="5" Name="emoji_box" Visibility="Hidden" Margin="100,10,10,160" VerticalAlignment="Bottom" HorizontalAlignment="Left">
<Border.Effect>
<DropShadowEffect BlurRadius="10" Color="#333" Direction="180" Opacity="0.3" RenderingBias="Performance" ShadowDepth="1">
<Storyboard.TargetProperty>
BlurRadius
</Storyboard.TargetProperty>
</DropShadowEffect>
</Border.Effect>
<WrapPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Width="250" Height="300">
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/1.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/2.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/3.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/4.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/5.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/6.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/7.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/8.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/9.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/10.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/11.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/12.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/13.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/14.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/15.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/16.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/17.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/18.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/19.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/20.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/21.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/22.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/23.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/24.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/25.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/26.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/27.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/28.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/29.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
<Image Cursor="Hand" ToolTip="Emoji" Margin="10" Source="Images/Emojis/30.png" Stretch="Fill" Height="30" VerticalAlignment="Center" Width="30" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="EmojiSendClickedAsync"/>
</WrapPanel>
</Border>
</Grid>
<Border CornerRadius="0,0,5,0" Background="#F5F5F5" Margin="90,10,10,10" Height="100" VerticalAlignment="Bottom" MouseUp="HideAllBoxClicked">
<Grid>
<TextBox GotFocus="SendMessageTextBoxFocused" LostFocus="SendMessageTextBoxLostFocus" Name="message_input" Background="Transparent" Margin="10" BorderThickness="0" Text="说点什么吧..." FontSize="14" Foreground="#333" TextWrapping="Wrap" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" KeyDown="MessageInputKeydown"/>
<Grid Margin="10,0,0,10" VerticalAlignment="Bottom" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
<Image Name="icon_song_player" Source="Images/music.png" Stretch="Fill" Height="24" VerticalAlignment="Center" Width="24" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True"/>
<Label Name="show_song_name" Content="歌曲加载中..." Foreground="#333" FontSize="12" VerticalAlignment="Center" Margin="0,-2,0,0"></Label>
<Image x:Name="button_next_song" Cursor="Hand" ToolTip="点击切歌" Source="Images/1_music82.png" Stretch="Fill" Height="24" Width="24" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" MouseUp="PassSong"/>
<Label Name="show_song_user" Content="" Foreground="#999" FontSize="12" HorizontalAlignment="Left" Margin="0,-2,0,0"></Label>
<Image Visibility="Hidden" Source="Images/1_music90.png" Stretch="Fill" Height="24" Width="24" VerticalAlignment="Center" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True"/>
</StackPanel>
</Grid>
</Grid>
</Border>
<Border CornerRadius="3" Background="#ddd" Margin="0,0,20,20" VerticalAlignment="Bottom" HorizontalAlignment="Right">
<Button Padding="20,10,20,10" Foreground="#666" Background="#eee" BorderThickness="0" FontSize="12" Cursor="Hand" Content="发送(Enter)" Margin="1,1,1,1" Click="Button_MessageSend_Clicked" />
</Border>
</Grid>
<Border Name="selectRoomBox" Background="#f5f5f5" CornerRadius="0,5,5,0" Margin="10,10,-400,10" Width="350" HorizontalAlignment="Right" Opacity="1">
<Border.Effect>
<DropShadowEffect BlurRadius="10" Color="#333" Direction="180" Opacity="0.3" RenderingBias="Performance" ShadowDepth="1">
<Storyboard.TargetProperty>
BlurRadius
</Storyboard.TargetProperty>
</DropShadowEffect>
</Border.Effect>
<Grid >
<Label FontSize="18" FontWeight="Bold" Foreground="#333" Margin="10">推荐热门房间</Label>
<Viewbox Stretch="None" HorizontalAlignment="Right" Margin="0,10,10,0" VerticalAlignment="Top">
<Border CornerRadius="3" Background="#666" Padding="15,8,15,8" Cursor="Hand">
<TextBlock x:Name="enter_my_room" TextWrapping = "Wrap" Foreground="#fff" Text="我的房间" TextTrimming="CharacterEllipsis" FontSize="14" Margin="0" MouseUp="EnterMyRoomClicked"/>
</Border>
</Viewbox>
<Label FontSize="12" Foreground="#ccc" Margin="0" VerticalAlignment="Bottom" HorizontalAlignment="Left">温馨提示:房间无用户在线将不会出现在此列表</Label>
<Grid>
<Border Background="#F5F5F5" Margin="0,50,0,25" >
<ListBox MouseDoubleClick="SelectRoomChanged" SelectedItem="{Binding CurrentSelectItem}" BorderThickness="1" ItemContainerStyle="{StaticResource RoomListStyle}" x:Name="room_list" BorderBrush="#eaeaeb" Background="Transparent" Margin="0,0,0,0 ">
<ListBox.Style>
<Style TargetType="{x:Type ListBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0">
<ScrollViewer Focusable="False">
<ItemsPresenter />
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.Style>
</ListBox>
</Border>
</Grid>
</Grid>
</Border>
<Border Name="searchSongBox" Background="#f5f5f5" CornerRadius="0,5,5,0" Margin="10,10,-400,10" Width="350" HorizontalAlignment="Right" Opacity="1">
<Border.Effect>
<DropShadowEffect BlurRadius="10" Color="#333" Direction="180" Opacity="0.3" RenderingBias="Performance" ShadowDepth="1">
<Storyboard.TargetProperty>
BlurRadius
</Storyboard.TargetProperty>
</DropShadowEffect>
</Border.Effect>
<Grid >
<Label FontSize="18" FontWeight="Bold" Foreground="#333" Margin="10">歌曲搜索</Label>
<Grid Margin="10,50,0,5" >
<Border Height="30" Margin="0,0,40,0" VerticalAlignment="Top" CornerRadius="5" Background="#fff" Padding="6">
<TextBox Name="search_song_keyword" Text="输入歌手/歌名/专辑搜索..." GotFocus="SearchSongTextBoxFocused" FontSize="12" BorderThickness="0" Background="Transparent" LostFocus="SearchSongTextBoxLostFocus" KeyDown="SearchSongTextBoxKeydown"></TextBox>
</Border>
<Image Source="Images/button_search.png" MouseUp="SearchSong" Stretch="Fill" Margin="0,2,8,0" Height="24" Width="24" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True" VerticalAlignment="Top" HorizontalAlignment="Right" Cursor="Hand" ToolTip="搜索"/>
</Grid>
<Label FontSize="12" Foreground="#ccc" Margin="0" VerticalAlignment="Bottom" HorizontalAlignment="Left">更多音乐正在接入中,反馈建议请联系10000房房管.</Label>
<Grid>
<Border Background="#F5F5F5" Margin="0,90,0,25">
<ListBox SelectedItem="{Binding CurrentSelectItem}" BorderThickness="1" ItemContainerStyle="{StaticResource SearchSongStyle}" x:Name="song_list" BorderBrush="#eaeaeb" Background="Transparent" Margin="0,0,0,0 ">
<ListBox.Style>
<Style TargetType="{x:Type ListBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0">
<ScrollViewer Focusable="False">
<ItemsPresenter />
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.Style>
</ListBox>
</Border>
<Border Background="#F5F5F5" Margin="0,90,0,25" Name="song_list_nodata">
<Label Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#999" FontSize="14" Name="song_list_nodata_tips">输入关键词搜索想听的歌曲吧</Label>
</Border>
</Grid>
</Grid>
</Border>
<Border Name="pickedSongBox" Background="#f5f5f5" CornerRadius="0,5,5,0" Margin="10,10,-400,10" Width="350" HorizontalAlignment="Right" Opacity="1">
<Border.Effect>
<DropShadowEffect BlurRadius="10" Color="#333" Direction="180" Opacity="0.3" RenderingBias="Performance" ShadowDepth="1">
<Storyboard.TargetProperty>
BlurRadius
</Storyboard.TargetProperty>
</DropShadowEffect>
</Border.Effect>
<Grid >
<Label FontSize="18" FontWeight="Bold" Foreground="#333" Margin="10">正在等待播放的歌曲</Label>
<Label FontSize="12" Foreground="#ccc" Margin="0" VerticalAlignment="Bottom" HorizontalAlignment="Left">遇到喜欢的歌?快顶上去插个队吧!</Label>
<Grid>
<Border Background="#F5F5F5" Margin="0,40,0,25">
<ListBox SelectedItem="{Binding CurrentSelectItem}" BorderThickness="1" ItemContainerStyle="{StaticResource PickedSongStyle}" x:Name="picked_list" BorderBrush="#eaeaeb" Background="Transparent" Margin="0,0,0,0 ">
<ListBox.Style>
<Style TargetType="{x:Type ListBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0">
<ScrollViewer Focusable="False">
<ItemsPresenter />
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.Style>
</ListBox>
</Border>
<Border Background="#F5F5F5" Margin="0,40,0,25" Name="picked_song_nodata" >
<Label Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#999" FontSize="14">没有歌曲啦,快去点歌吧~</Label>
</Border>
</Grid>
</Grid>
</Border>
<Border Name="mySongBox" Background="#f5f5f5" CornerRadius="0,5,5,0" Margin="10,10,-400,10" Width="350" HorizontalAlignment="Right" Opacity="1">
<Border.Effect>
<DropShadowEffect BlurRadius="10" Color="#333" Direction="180" Opacity="0.3" RenderingBias="Performance" ShadowDepth="1">
<Storyboard.TargetProperty>
BlurRadius
</Storyboard.TargetProperty>
</DropShadowEffect>
</Border.Effect>
<Grid >
<Label FontSize="18" FontWeight="Bold" Foreground="#333" Margin="10">你最喜欢点的歌</Label>
<Label FontSize="12" Foreground="#ccc" Margin="0" VerticalAlignment="Bottom" HorizontalAlignment="Left">温馨提示:此列表将显示你最喜欢的50首歌</Label>
<Grid>
<Border Background="#F5F5F5" Margin="0,50,0,25" >
<ListBox SelectedItem="{Binding CurrentSelectItem}" BorderThickness="1" ItemContainerStyle="{StaticResource MySongStyle}" x:Name="my_list" BorderBrush="#eaeaeb" Background="Transparent" Margin="0,0,0,0 ">
<ListBox.Style>
<Style TargetType="{x:Type ListBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="0">
<ScrollViewer Focusable="False">
<ItemsPresenter />
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.Style>
</ListBox>
</Border>
<Border Background="#F5F5F5" Margin="0,50,0,25" Name="my_song_nodata">
<Label Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#999" FontSize="14">你还没有点过歌呀,快去点歌吧~</Label>
</Border>
</Grid>
</Grid>
</Border>
<Grid Visibility="Hidden">
<Border CornerRadius="1000" BorderThickness="0" Width="150" Height="150" Margin="0,65,16,0" VerticalAlignment="Top" HorizontalAlignment="Right">
<Border.Background>
<ImageBrush ImageSource="Images/player_bg.png" />
</Border.Background>
</Border>
<Border CornerRadius="1000" BorderThickness="0" Width="100" Height="100" Margin="0,90,42,0" VerticalAlignment="Top" HorizontalAlignment="Right" x:Name="image_song_picture" UseLayoutRounding="True" RenderOptions.BitmapScalingMode="HighQuality" SnapsToDevicePixels="True">
<Border.Background >
<ImageBrush ImageSource="Images/1567952196.jpg" />
</Border.Background>
<Border.RenderTransform>
<RotateTransform Angle="0"/>
</Border.RenderTransform>
</Border>
<Border BorderThickness="0" Margin="0,10,25,0" VerticalAlignment="Top" HorizontalAlignment="Right" Height="119" Width="89" >
<Border.Background>
<ImageBrush ImageSource="Images/player_bar.png" />
</Border.Background>
</Border>
</Grid>
</Grid>
</Window>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化