Upgrading PKS July TechPreview to Silverlight 2.0 Beta 2

Jul 21, 2008 at 5:07 PM
As you probably know by now, the team wasn't able to upgrade the PKS July TP build to SL 2.0 beta 2 in time, and is still running the outdated beta 1... bummer.

However, Thomas has looked into this and found the following update working well.

The nice side-effect is the removed dependency on Web.Preview which was the source of an access denied problem for some of you. Not sure if it will fix it thought and I'm looking forward to hear from you all on this.
PKS will be upgraded to SL2 beta 2 (or even RTM if it's out) in the August Tech Preview.

Thanks Thomas! And good testing for those of you interested in this update.
Cheers, Ludo.

== Migrating to Silverlight 2 Beta2

- In the SilverlightPlayer project:

Remove Microsoft.Web.Preview.dll from Source\PKS PreReqs\ExternalDependencies
Remove it from the Exernal Dependencies of the solution
Remove it from the References in the SilverlightPlayer project
Remove it from Source\PKS PreReqs\SilverlightPlayer\cab.ddf
Remove the reference in Source\PKS PreReqs\LocalFileStore\UploadFiles\Setup\Solution\wsp_structure.ddf
Remove the reference in Source\PKS PreReqs\LocalFileStore\UploadFiles\Setup\Solution\manifest.xml

Add a reference to the Silverlight server-side assembly: C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Server\System.Web.Silverlight.dll

using Microsoft.Web.Preview.UI.Controls;
using System.Web.UI.SilverlightControls;
(you will need to do the same in ConsumerWebPart.cs)

Change from Media to MediaPlayer, i.e.:
        private MediaPlayer media;
  media = new MediaPlayer();

In SilverlightPlayer.cs:

Line 63, change MediaUrl to MediaSource
Line 66, change PlaceholderImageUrl to PlaceholderSource
Comment out line 67 : I haven't found an easy way to replace MediaSkin attribute
Line 71, change SilverlightBackColor to BackColor

- In the PKS.Silverlight.FileUpload project:

Line 125, change ofd.EnableMultipleSelection to Multiselect

Line 127, change the test to == false (instead of testing for Cancel)

- In the UploadFiles project:

Line 83, comment out the .Version assignment (seems to be deprecated)

Jul 24, 2008 at 2:41 PM
To bring back the PKS skinning for the Silverlight playback control, do the following:

In the OnPreRender function, update the MediaSkinSource code to this
- media.MediaSkinSource = this.MediaSkinSource; 

Then on the file system
- after downloading the Silverlight 2.0 beta 2 SDK, copy the skin files from C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Server\MediaPlayerSkins to a location under the root of your web site (I chose \ClientBin\MediaPlayerSkins)

Finally in the podcast edit page
- in the podcast edit page edit the SL media player webpart properties, and in the "Custom Media Skin Source" field input the path to your selected skin, PKS is by default using "/ClientBin/MediaPlayerSkins/Professional.xaml".

I have found that the upload skin was broken after moving over to Silverlight 2.0 beta 2. We're looking into it for the August Tech Preview... in the meantime any suggestion will be appreciated :)