Gestalt for Silverlight 3
Aug 13, 2009 In Development By Hans HugliSilverlight 3 was just shipping at the time that we were releasing Gestalt, we decided to release wither Silverlight 2 in order to reach a larger client base including Moonlight on Linux. We thought that it would still be useful to incorporate Silverlight 3’s new capabilities into an optional Gestalt build, that continues to preserve Gestalt applications that worked on Silverlight 2. Today we are making the “Gestalt Silverlight 3 build” available for download on CodePlex. Silverlight 3 has great new set of features such as: 3D Graphics, Pixel Effects, Bitmap API, GPU Acceleration, plus a host of other improvements. Tim Heuer’s blog post goes into some great detail about these features.
In order to take advantage of the new Silverlight 3 features in your Gestalt applications, you simply need to replace the set of existing Gestalt*.xap files with the ones that can be downloaded from CodePlex. These files are located in the “gs” folder in the GettingStarted.zip file. That’s it. All your existing Gestalt apps will continue to function with no changes. Note that this new version of Gestalt will not prompt you to upgrade you to Silverlight 3, so if you do not already have it installed, you will need to upgrade to it here.
To show off this new functionality we created a basic sample Gestalt application that demonstrates a pixel effect using the built in drop shadow effect; note again that you must have Silverlight 3 installed to view this page. It simply creates some Ellipses using drop shadows with blur.
The XAML for the page contains multiple Ellipse elements here is one such element:
<ellipse fill="#FF448E9D" stroke="Black"
margin="94,137,0,0" width="55" height="59">
<ellipse.effect>
<dropshadoweffect blurradius="13" direction="321"
opacity="0.88"></dropshadoweffect>
</ellipse.effect>
</ellipse>
This effect can be applied to almost any Silverlight element. Right click on the application page to view its source.
One is not limited to the built-in Pixel Shader effects; custom Pixel Shader effects are written in HLSL (High Level Shader Language) which was originally developed for DirectX. This same language can now be used to write Pixel Shader’s that can be applied to Silverlight elements. To see how to go about creating advanced Pixel Shader effects for Silverlight,take a look at this article.
Please do not hesitate to leave a comment, and if twitter is your thing, follow us there to hear when we release new content, opinions or articles.


