Windows Phone导航到代码错误

时间:2015-11-30 20:15:29

标签: c# windows-phone-8

我是stackoverflow的新成员。我正在尝试使用c#创建一个Windows Phone 8.0 mp3播放器。我从Microsoft示例页面下载了背景音频播放器示例。我用这些代码来构建我的mp3播放器应用程序。如果您想参考代码,请点击此链接https://msdn.microsoft.com/en-us/library/windows/apps/hh202978(v=vs.105).aspx。但是,当我尝试构建我的应用时,我收到此错误。

Error   1   'dj_mxx_player.Player.OnNavigatedTo(Microsoft.Phone.Controls.NavigatingEventArgs)': no suitable method found to override    C:\Users\dansyo\Documents\Visual Studio 2013\Projects\dj mxx player\dj mxx player\Player.xaml.cs    23  33  dj mxx player

这是给我上述错误的代码。

 protected override void OnNavigatedTo(NavigatingEventArgs e)
        {

            if (PlayState.Playing == BackgroundAudioPlayer.Instance.PlayerState)
            {
                BitmapImage ImageSource = new BitmapImage(new Uri(@"images/play.png", UriKind.Relative));
                pause.Source = ImageSource;
                a1.Text = BackgroundAudioPlayer.Instance.Track.Title + "By";
                a2.Text = BackgroundAudioPlayer.Instance.Track.Artist;
            }
            else
            {
                BitmapImage ImageS = new BitmapImage(new Uri(@"images/pause.png", UriKind.Relative));
                pause.Source = ImageS;
                a1.Text = " ";
                a2.Text = " ";
            }
        }

请帮我解决这个问题。致谢

0 个答案:

没有答案