Creating Music Player in C#

Creating Music Player

  public MainPage()                                 

     //mediaelement button used                                                                

      //select source file

        {

            this.InitializeComponent();

        }

 

        /// <summary>

        /// Invoked when this page is about to be displayed in a Frame.

        /// </summary>

        /// <param name="e">Event data that describes how this page was reached.  The Parameter

        /// property is typically used to configure the page.</param>

 

        protected override void OnNavigatedTo(NavigationEventArgs e)

        {

        }

        private void button1_Click(object sender, RoutedEventArgs e)     //play button

        {

            mediaelement1.Play();

        }

        private void button2_Click(object sender, RoutedEventArgs e)

        {

            mediaelement1.Pause();

        }

        private void button3_Click(object sender, RoutedEventArgs e)

        {

            mediaelement1.Stop();

        }

        private void button3_Click(object sender, RoutedEventArgs e)   //volume button

        {

            If(mediaelement != null && volumeControl != null)

            Mediaelement.Volume = volumeControl1.Value/100;

    }         

})

Insertion Of Image(In music Player)

we can also insert an image in media player by simply-

// click media element button
// add image in assets then select image in poster source 
// you are ready to go