Objective
The previous article describes how to use the MediaElement control to play Network radio, describes the media file format supported by the MediaElement control, and some of its limitations, and describes how the slider control is used and how data is bound. This article describes how to use Silverlight for animation development.
New pictures and configuration files
I use Paint.NET to do some radio (logo) logo files, stored in the images file.
I save the configuration information of the radio to the XML file, you can later modify the XML file to expand the radio information, improve scalability. Even the configuration file can be stored online, the program automatically updates each time it starts.
<?xml version= "1.0" encoding= "Utf-8"
<stations>
<station id= "1" name= "Mix 106.5" url = "Http://icecast.arn.com.au/1065.mp3" image= "1065.png"/>
<station id= "2" name= "101.7 WS FM" Url= "Http://ic Ecast.arn.com.au/1017.mp3 "image=" 1017.png "/>
<station id=" 3 "name=" the Edge96one "Url=" Http://icecast.arn . Com.au/961.mp3 "image=" 961.png "/>
<station id=" 4 "name=" Mix 101.1 "url=" http://icecast.arn.com.au/1011.mp 3 "image= 1011.png"/>
<station id= "5" name= "GOLD 104.3" url= "Http://icecast.arn.com.au/1043.mp3" image= "10 43.png "/>
<station id=" 6 "name=" 97.3 FM "url=" Http://icecast.arn.com.au/973.mp3 "image=" 973.png "/>
<station id= "7" name= "Mix 102.3" url= "Http://icecast.arn.com.au/1023.mp3" image= "1023.png"/>
<sta tion id= "8" name= "Cruise 1323AM" url= "Http://icecast.arn.com.au/1323.mp3" image= "1323.png"/>
</stations
Stations label is the container of each station label, ID is the unique identification of the radio, name is the name of the radio station, the URL is the address of the online playback, not sure if it is the cause of the simulator, I tried network radio just support the MP3 format, I want to support a variety of formats, as the official document says, for all supported media file formats, please see article. Image is the name of the radio logo picture file, stored under the images folder above.
Copy the config and images folders under the project folder, and then add the files to the project