【ACCESS精品源码栏目提醒】:以下是网学会员为您推荐的ACCESS精品源码-用wpf做的音乐播放器 - 其它资料,希望本篇文章对您学习有所帮助。
Wpf之音乐播放器程序界面:前台代码:ltWindow x:Classquot音°乐¤播¤放¤器.MainWindowquot xmlnsquothttp://schemas.microsoft.com/winfx/2006/xaml/presentationquot xmlns:xquothttp://schemas.microsoft.com/winfx/2006/xamlquot Titlequot音°乐¤播¤放¤器quot Heightquot361quot Widthquot489quot LoadedquotWindow_Loadedquot Namequot音°乐¤播¤放¤器quotgt ltGrid BackgroundquotBlackquotgt ltGrid.ColumnDefinitionsgt ltColumnDefinition Widthquot340quotgtlt/ColumnDefinitiongt ltColumnDefinition Widthquot127quotgtlt/ColumnDefinitiongt lt/Grid.ColumnDefinitionsgt ltGrid.RowDefinitionsgt ltRowDefinition Heightquotquotgtlt/RowDefinitiongt ltRowDefinition Heightquot102quotgtlt/RowDefinitiongt lt/Grid.RowDefinitionsgt ltGrid Grid.Columnquot0quot Grid.Rowquot0quot BackgroundquotBlackquot gt ltGrid.RowDefinitionsgt ltRowDefinition Heightquotquotgtlt/RowDefinitiongt ltRowDefinition Heightquot38quotgtlt/RowDefinitiongt lt/Grid.RowDefinitionsgt ltGrid Grid.Rowquot1quot BackgroundquotBlackquotgt ltGrid.ColumnDefinitionsgt ltColumnDefinition Widthquot60.5quotgtlt/ColumnDefinitiongt ltColumnDefinition Widthquot60.5quotgtlt/ColumnDefinitiongt ltColumnDefinition Widthquotquot /gt lt/Grid.ColumnDefinitionsgt ltStackPanel OrientationquotVerticalquot Grid.Columnquot2quotgt êoquot ltLabel Contentquot当前播¤放¤: Heightquot20quot FontSizequot10quot Namequotlable1quotVerticalAlignmentquotTopquot ForegroundquotRedquotgtlt/Labelgt ltSlider Namequotslider1quot ValuequotBindingElementNamemePathme.positionModeTwoWayquot VerticalAlignmentquotCenterquotValueChangedquotslider1_ValueChangedquotgtlt/Slidergt lt/StackPanelgt ltLabel Namequottxtruntimequot Grid.Columnquot0quot HorizontalAlignmentquotStretchquotVerticalAlignmentquotCenterquot FontSizequot12.5quot ForegroundquotRedquotgtlt/Labelgt ltLabel Namequottxttataltimequot Grid.Columnquot1quot VerticalAlignmentquotCenterquotFontSizequot12.5quot ForegroundquotRedquotgtlt/Labelgt lt/Gridgt ltMediaElement Namequotmequot Grid.Columnquot0quot Grid.Rowquot0quot LoadedBehaviorquotManualquotMediaEndedquotme_MediaEndedquot /gt lt/Gridgt ltListBox NamequotlistBox1quot Grid.Columnquot1quot Grid.RowSpanquot2quotSelectionChangedquotlistBox1_SelectionChangedquot MouseDoubleClickquotlistBox1_MouseDoubleClick_1quotForegroundquotAntiqueWhitequot BackgroundquotBlackquot BorderBrushquotBluequot BorderThicknessquot5quotgt ltListBox.ContextMenugt ltContextMenugt ltMenuItem Headerquot添¨加¨单¤个媒体文件tquot ClickquotMenuItem_Clickquot gt lt/MenuItemgt ltMenuItem Headerquot删除y单¤个媒体文件tquot ClickquotMenuItem_Click_1quotgt lt/MenuItemgt ltMenuItem Headerquot清空列D表¨quot ClickquotMenuItem_Click_2quotgt lt/MenuItemgt lt/ContextMenugt lt/ListBox.ContextMenugt lt/ListBoxgt ltGrid Grid.Rowquot1quot Grid.Columnquot0quotgt ltGrid.ColumnDefinitionsgt ltColumnDefinitiongtlt/ColumnDefinitiongt ltColumnDefinitiongtlt/ColumnDefinitiongt ltColumnDefinitiongtlt/ColumnDefinitiongt lt/Grid.ColumnDefinitionsgt ltGrid.RowDefinitionsgt ltRowDefinitiongtlt/RowDefinitiongt ltRowDefinitiongtlt/RowDefinitiongt ltRowDefinitiongtlt/RowDefinitiongt lt/Grid.RowDefinitionsgt ltButton BackgroundquotBlackquot Grid.Rowquot1