Silverlight version of library fails at compile-time

Feb 19, 2011 at 5:57 PM


I've trouble running this in Visual Studio 2010. I've already installed the Silverlight 3 toolkit and the WPF library and sample application are running fine.

The point is however that the Silverlight version of it fails on compile-time when I try to build it on this code:


WriteableBitmap current = new WriteableBitmap((int)this.EffectsPlaceHolder.ActualWidth, (int)this.EffectsPlaceHolder.ActualHeight, PixelFormats.Bgr32);
current.Render(this.EffectsPlaceHolder, new MatrixTransform());

ImageBrush currentBrush = new ImageBrush();
currentBrush.ImageSource = current;
BloodTransitionEffect bloodEffect = new BloodTransitionEffect();


WriteableBitmap current = new WriteableBitmap((int)this.TransitionsPlaceHolder.ActualWidth, (int)this.TransitionsPlaceHolder.ActualHeight,  PixelFormats.Bgr32);
current.Render(this.TransitionsPlaceHolder, new MatrixTransform());

ImageBrush currentBrush = new ImageBrush();
currentBrush.ImageSource = current;

With the error

Error    3    The name 'PixelFormats' does not exist in the current context    D:\csharp\WPFSLFx\SL\Demo_silverlight\SLEffectHarness\MainPage.xaml.cs    57    148    SLEffectHarness

Anyone has any idea on how to tackle this issue?

Thank you for your assistance.
Feb 24, 2011 at 6:45 PM

Never mind. I created a new silverlight FX demo application. Here:

Short FAQ:

Q. What's different?

A. Everything. For starters, this application doesn't use all kinds of wierd SDK toolkits. It's much cleaner.

Q. What works and what doesn't?

A. Some shader and some transitions are disabled because I didn't got them to work. But 80% of them work pretty well.