Silverlight and WPF are different beasts. The similarities between the two is high, but there are enough differences to foul you up now and then.
Choose your platform preference
There is a new addition to the Settings pane. The code generation engine will consider your desired platform when generating the .NET classes.
Figure 1: Target Framework setting.
As you can see from the following code examples Shazzam creates slightly different versions of the DependencyProperty registration code depending on your framework choice. Shazzam also ignores Point3D, Vector3D, or Point4D property types when creating Silverlight classes as Silverlight 3 doesn’t support these types yet.
// Use UIPropertyMetaData for WPF
public static readonly DependencyProperty AspectRatioProperty
= DependencyProperty.Register("AspectRatio", typeof(double),
typeof(BandedSwirlEffect), new UIPropertyMetadata(((double)(1.5)),
PixelShaderConstantCallback(3)));
// Use PropertyMetaData for Silverlight
public static readonly DependencyProperty AspectRatioProperty
= DependencyProperty.Register("AspectRatio", typeof(double),
typeof(BandedSwirlEffect), new PropertyMetadata(((double)(1.5)),
PixelShaderConstantCallback(3)));
Constructor
Shazzam now generates a parameterless constructor that automatically loads the compiled pixel shader from an assembly resource. If the name of your assembly is different from the name of your namespace, you’ll need to hand-edit the URI in the constructor."
The resource URI can be relative, taking the form "/AssemblyName;component/ShaderName.ps" – this new syntax works in both WPF and Silverlight.
Summary
[Shazzam 1.1 was released on October 11, 2009]
See a list of additional help pages here.
Install your own copy of the free Shazzam Pixel Shader Utility here.
[...] SilverlightToys, SilverlightTips, Rishi, and Fons Sonnemans. Shoutout: Walt Ritscher blogged What’s New in Shazzam 1.1 – Better Silverlight Support … take a look at it now! From [...]
[...] « What’s New in Shazzam 1.1 – Animation What’s New in Shazzam 1.1 – Better Silverlight Support [...]