I have a very large image that I would like to use for sprites (Γ la css image sprites ).
I have the code below:
<Image x:Name="testImage" Width="24" Height="12" Source="../Resources/Images/sprites.png"> <Image.Clip> <RectangleGeometry Rect="258,10632,24,12" /> </Image.Clip> </Image>
This will copy the original image at 24x12 at a relative position of 258, 10632 in the original image.
The problem is that I want the cropped image to show at 0,0 in testImage, while it shows it at 258, 10632. It uses geometry as a guide for cutting, as well as a layout guide.
Does anyone know how to do this? if at all.
Conclusion: There seems to be no good way to do this at this time, the Graeme solution seems the closest to achieving this with Silverlight 2.0.
However, if anyone knows how best to do this, answer with an answer.
Tristan warner-smith
source share