Silverlight SeeqPod Player now Silverlight 2 (with SourceCode)

Silverlight SeeqPod Screen Shot

In my weekend attempt to upgrade some of my older examples, the Silverlight SeeqPod Player is now all Silverlight 2

Converting the Silverligth 1.1 application to a 2.0 was remarkably harder than the Silverlight 1.0 to 2.0.  It may be because of use of user controls versus real controls (I changed from using two nested user controls to using a ListBox with Control Templates). In addition, switching the format of the web service usage from consuming XML directly to using DataContracts confused it a bit but overall it wasn't difficult. Lastly, I was using a layered HTML input control for a TextBox, and changing it over to a built-in one, took a little time too. Some code just simply disappeared (as I was moving some text around to make it appear like it was centered, but now its just a matter of marking it as TextAlignment = Center.

I was also able to polish some features I wanted to add:

  • The Play Panel how slides in and out like I originally wanted.
  • When the URL from SeeqPod is a dead link, I now change the UI to show its a bad song so you don't continue to click on the song.
  • I also added Tooltips to help make sense of some of the non-text buttons.

Here's the source if you want to play with it: Source Code

UPDATE: I've updated the code (and the app) as I found some odd behavior with random or shuffle play.  One of the things I noticed was that the selected item was not getting updated all the time.  I realized that during some operations (MediaElement specific events and callbacks in Web Service Proxy's), you're not actually running on the main UI thread.  This is not a big surprise but since it fails silently it can cause odd issues.  To get around it I used the Dispatcher to fire an event on the UI thread:

Dispatcher.BeginInvoke(() => { songList.SelectedIndex = someValue; } );

You could use an anonymous delegate, but I prefer this shorthand Lambda function.  It fixed the issue with the wierdness of showing hte selected index. 

Hope this helps some of you struggling with issues.

Comments:

wow! didn't look into the code yet but user experience is so nice. almost the player i always wanted :)

thank you for sharing the code!


Great player Shawn!

Thank you very much for sharing the source - it's a great example.

David Roh

Fantastic.

This code does not work with silverlight 2.0 final

jobe,

Sorry, it was an old version on this server. I've updated the link and the download package. This should be the one that works with SL2.

Still a boatload of erros when vs2008 tries to compile this. I am so anxious to see this actually compile :):

Error 1 The property 'FontFamily' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 86 17 SilverlightSeeqPod
Error 2 The property 'FontSize' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 87 17 SilverlightSeeqPod
Error 3 The property 'FontStretch' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 88 17 SilverlightSeeqPod
Error 4 The property 'FontStyle' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 89 17 SilverlightSeeqPod
Error 5 The property 'FontWeight' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 90 17 SilverlightSeeqPod
Error 6 The property 'Foreground' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 91 17 SilverlightSeeqPod
Error 7 The property 'HorizontalContentAlignment' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 92 17 SilverlightSeeqPod
Error 8 The property 'Padding' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 93 17 SilverlightSeeqPod
Error 9 The property 'TextAlignment' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 94 17 SilverlightSeeqPod
Error 10 The property 'TextDecorations' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 95 17 SilverlightSeeqPod
Error 11 The property 'TextWrapping' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 96 17 SilverlightSeeqPod
Error 12 The property 'VerticalContentAlignment' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 97 17 SilverlightSeeqPod
Error 13 The property 'FontFamily' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 139 33 SilverlightSeeqPod
Error 14 The property 'FontSize' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 140 33 SilverlightSeeqPod
Error 15 The property 'FontStretch' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 141 33 SilverlightSeeqPod
Error 16 The property 'FontStyle' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 142 33 SilverlightSeeqPod
Error 17 The property 'FontWeight' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 143 33 SilverlightSeeqPod
Error 18 The property 'Foreground' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 144 33 SilverlightSeeqPod
Error 19 The property 'HorizontalContentAlignment' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 145 33 SilverlightSeeqPod
Error 20 The property 'Padding' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 146 33 SilverlightSeeqPod
Error 21 The property 'TextAlignment' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 147 33 SilverlightSeeqPod
Error 22 The property 'TextDecorations' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 148 33 SilverlightSeeqPod
Error 23 The property 'TextWrapping' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 149 33 SilverlightSeeqPod
Error 24 The property 'VerticalContentAlignment' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 150 33 SilverlightSeeqPod
Error 25 The property 'FontFamily' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 228 17 SilverlightSeeqPod
Error 26 The property 'FontSize' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 229 17 SilverlightSeeqPod
Error 27 The property 'FontStretch' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 230 17 SilverlightSeeqPod
Error 28 The property 'FontStyle' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 231 17 SilverlightSeeqPod
Error 29 The property 'FontWeight' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 232 17 SilverlightSeeqPod
Error 30 The property 'Foreground' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 233 17 SilverlightSeeqPod
Error 31 The property 'HorizontalContentAlignment' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 235 17 SilverlightSeeqPod
Error 32 The property 'Padding' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 236 17 SilverlightSeeqPod
Error 33 The property 'TextAlignment' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 237 17 SilverlightSeeqPod
Error 34 The property 'TextDecorations' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 238 17 SilverlightSeeqPod
Error 35 The property 'TextWrapping' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 239 17 SilverlightSeeqPod
Error 36 The property 'VerticalContentAlignment' was not found in type 'ContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 240 17 SilverlightSeeqPod
Error 37 The property 'Background' was not found in type 'ScrollContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 269 39 SilverlightSeeqPod
Error 38 The property 'FontFamily' was not found in type 'ScrollContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 270 39 SilverlightSeeqPod
Error 39 The property 'FontSize' was not found in type 'ScrollContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 271 39 SilverlightSeeqPod
Error 40 The property 'FontStretch' was not found in type 'ScrollContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 272 39 SilverlightSeeqPod
Error 41 The property 'FontStyle' was not found in type 'ScrollContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 273 39 SilverlightSeeqPod
Error 42 The property 'FontWeight' was not found in type 'ScrollContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 274 39 SilverlightSeeqPod
Error 43 The property 'Foreground' was not found in type 'ScrollContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 275 39 SilverlightSeeqPod
Error 44 The property 'HorizontalContentAlignment' was not found in type 'ScrollContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 276 39 SilverlightSeeqPod
Error 45 The property 'TextAlignment' was not found in type 'ScrollContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 277 39 SilverlightSeeqPod
Error 46 The property 'TextDecorations' was not found in type 'ScrollContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 278 39 SilverlightSeeqPod
Error 47 The property 'TextWrapping' was not found in type 'ScrollContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 279 39 SilverlightSeeqPod
Error 48 The property 'VerticalContentAlignment' was not found in type 'ScrollContentPresenter'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 280 39 SilverlightSeeqPod
Error 49 The property 'Duration' was not found in type 'VisualTransition'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 362 45 SilverlightSeeqPod
Error 50 The property 'Duration' was not found in type 'VisualTransition'. S:\silverlightseeqpod\SilverlightSeeqPod\App.xaml 450 45 SilverlightSeeqPod


Hey Shawm. The source in that zip is not SL 2.0 RC compliant. A number of errors are produced. Please update and post a working version as this lokos very cool.

Hey Shawm. The source in that zip is not SL 2.0 RC compliant. A number of errors are produced. Please update and post a working version as this looks very cool.


 



 
Save Cancel