News and Updates
Current state of the world includes redoing samples for Silverlight 3, porting the library to Silverlight 3 and updating what is included... more to come shortly.
in the upcoming release for Silverlight 3 we get the following changes:
Routed Events in Silverlight 3 (See Andrews SLRoutedEvent Project for more detail)
Faisels ViewPanel3D
Animating MultiPanel including Radial Panel support, stack panel, random panel and more
Robby's Animating Panel Base (well a version of it anyway)
FX Control
FXg Control
BrowserHistory Control
MouseWheel Support Control(s)
Tools Control including eval for C#, GetColor, ReadStringResource, InsertECMAScript
Generic Pixel Shader Class
Crossfader Player Control (pending)
current release is: v2.5.018 b1
Description
HackingSilverlight library is a set of custom silverlight controls for beta 2 that are a companion to the book HackingSilverlight that comes out in Sept. as well as just really cool controls that help in general developement of silverlight applications. The bits will be moved forward as new Silverlight builds are released. The control library includes simple custom panels, Robby's Animating Panel Base, Browser History Manager, and Mouse Wheel Event manager and more. The solution includes unit tests and the controls as a seperate library. More controls will be added as I find time or others end me cool stuff to add
here is a demo page with all the unit tests for all of the controls:
http://www.HackingSilverlight.net/HSL.html
Current Silverlight Controls List
Routed Events in Silverlight 3 (See Andrews SLRoutedEvent Project for more detail)
Faisels ViewPanel3D
Animating MultiPanel including Radial Panel support, stack panel, random panel and more
Robby's Animating Panel Base (well a version of it anyway) ( see
http://notstatic.com/ )
FX Control
FXg Control
BrowserHistory Control ( requires some wiring in the core application as well as some 'minor' html to work)
MouseWheel Support Control(s) (requires some wiring in the core application to work)
Tools Control including eval for C#, GetColor, ReadStringResource, InsertECMAScript
Generic Pixel Shader Class
Crossfader Player Control (pending)
if your from the WPF world, and looking for panels try looking at the Blendables Panels mix which is much more sophisticated... check out them out at
http://www.Blendables.com/ and in an effort of full disclosure I do work for the company and these controls are not derivatives in any way but out put from the forth coming book I"m writing on 'Hacking Silverlight'
Example Usage in Silverlight
Using most of the controls are pretty straight forward. To start with you need of course the current Silverlight bits installed including Visual Studio 2008. With you silverlight project open you need to add the 'HackingSilverlightLibrary.dll' to your project. Then add it as a reference in the solution explorer so it shows up under 'References'. Then in the Xaml where you want to use it you can look at the usecase examples of each control in the code base but basically you need todo this:
1. Add the namespace reference at the top of the xaml in the root node like this:
xmlns:hsl="clr-namespace:HackingSilverlightLibrary;assembly=HackingSilverlightLibrary"
2. Add the control to the xaml like this (be sure to set basic values like the name and sizes):
<hsl:AnimatingMultiPanel x:Name="MyAnimatingMultiPanel" Width="200" Height="200" > </hsl:AnimatingMultiPanel>
3. Set any special values and in the case of the MultiPanel we need to set the 'Mode' which can be either Radial, Wrap, Stack or Random currently like this:
Mode="Wrap"
4. lastly add whatever it is you want as children. and your good to go. Run your Silverlight app and you should see the control working.
Multi Panel Usage
The multi panel is an animating content panel including a stack panel, wrap panel, radial panel and random panel. Given the above reference it can be used on its own like this:
<hsl:AnimatingMultiPanel x:Name="MyAnimatingMultiPanel" Width="400" Height="400" Mode="Wrap" >
<Rectangle Fill="#FF9B1E1E" Width="20" Height="20" />
<Rectangle Fill="Aqua" Width="20" Height="20" />
<Rectangle Fill="Green" Width="20" Height="20" />
<Rectangle Fill="Aqua" Width="20" Height="20" />
</hsl:AnimatingMultiPanel>
or used as a layout or 'PanelTemplate' for things like list box etc. Here is a simple implementation:
<ListBox Width="130" Height="300" ScrollViewer.VerticalScrollBarVisibility="Auto" Visibility="Collapsed" >
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<hsl:AnimatingMultiPanel x:Name="MyAnimatingMultiPanel2" Width="100" Height="800" Mode="Wrap" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<Rectangle Fill="#FF9B1E1E" Width="20" Height="20" />
<Rectangle Fill="Aqua" Width="20" Height="20" />
<Rectangle Fill="Green" Width="20" Height="20" />
<Rectangle Fill="Aqua" Width="20" Height="20" />
</ListBox>