Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 777563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:37:30+00:00 2026-05-14T19:37:30+00:00

I have a Mediaplayer control on my XAML page like below: <CustomMediaElement:CustomMediaPlayer x:Name=custMediaElement VerticalAlignment=Center

  • 0

I have a Mediaplayer control on my XAML page like below:

<CustomMediaElement:CustomMediaPlayer 
                x:Name="custMediaElement"  
                VerticalAlignment="Center"
                Width="600" Height="300"  Visibility="Collapsed" />

Now I am ble to set the playList by using setPlayList() method like below:

private void setPlayList()
            {
                IEnumerable eLevelData = null;
                eLevelData = pMainPage.GetDataFromDictonary(pMainPage.strChildFolderID);

                    foreach (RMSMedia folderItems in eLevelData)
                    {
                        string strmediaURL = folderItems.strMediaFileName;
                        if (hasExtension(strmediaURL) == "wmv" || hasExtension(strmediaURL) == "mp4" || hasExtension(strmediaURL) == "mp3" || hasExtension(strmediaURL) == "mpg")
                        {
                            PlaylistItem playListItem = new PlaylistItem();
                            string thumbSource = folderItems.strAlbumcoverImage;
                            playListItem.MediaSource = new Uri(strmediaURL, UriKind.RelativeOrAbsolute);

                            playListItem.Title = folderItems.strAlbumName;

                            if (!string.IsNullOrEmpty(thumbSource))

                                playListItem.ThumbSource = new Uri(thumbSource, UriKind.RelativeOrAbsolute);

                            playList.Items.Add(playListItem);
                        }
                }


                custMediaElement.Playlist = playList;

            }

Now , I want to change the PlayListIndex of Mediaplayer, when user clicks on a listBox Item , which contains the title of all the songs.

When the user clicks on the third song title from the songs Title List the mediaPlayer should play the third song , or if the user cliks on 7th song title, the mediaPlayer should play the 7th song.

My motto is to pick up the Selected index from the listbox and assign it to the PlayList Index of mediaPlayer.

While I add a watch to playList I am able to see , playList , Items , [0] PlaylistIndex 1

playList , Items , [1] PlaylistIndex 2

But While I am trying to set it from the code , the same property PlaylistIndex seems unavailable. Please help.

Thanks,
Subhen

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:37:31+00:00Added an answer on May 14, 2026 at 7:37 pm

    It was not that complicated. I was just unsure of the methods. So answer goes like below:

    int currentPlayListItem = listBox.SelectedIndex;
    custMediaElement.GoToPlaylistItem(currentPlayListItem);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mediaplayer that can only read samba shared files. I would like
I have added and mediaplayer control to my c# application, and I can make
I have two activity: MediaPlayer_Activity (display the control like play,pause,stop,next....) MediaPlayerPlayList_Acitivty (to display all
Good day. I have a dropdown list control called audioList. Whenever the page loads
I have this .net page where I have a media player control and a
I am doing a streamed musicplayer for android. I have tried with MediaPlayer mp.setDataSource(http://www.myServerPage.com/songUrl.mp3);
I have avery simple program which uses MediaPLayer. I am new to java and
I have a problem with playing video in mediaplayer. I have a sound but
In Adnroid, at first i declare the mediaplayer by MediaPlayer mpl; next I have
I have added the Windows Media Player com control into my toolbox and then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.