.netgraphicssilverlight-3.0multiscaleimage

How to add graphics on top of a multiscaleimage?


I want to add graphics to a multiscaleimage. I use the project that Deep Zoom Composer auto generated when creating a multiscaleimage. Displaying the multiscaleimage from VS2008 works.

I've tried this and added the graphics to the maincanvas, without any results:

<Grid>
 <Canvas Name="maincanvas"/>
 <MultiScaleImage/>
</Grid>

Edit: When the user zooms in on the multiscaleimage, the user can place geometrically figures on the image. E.g. place a rectangle next to a person in the image, which will act as a speech balloon. I know this can be done on the image before the image is scaled, but I would like to do it dynamically.


Solution

  • By following the tutorial at link text, and then using the following code, made it possible to draw on top of the multiscaleimage.

    <Grid x:Name="LayoutRoot">
    <MultiScaleImage x:Name="deepZoomObject" Source="source/dzc_output.xml"/>  
    <Canvas>
     <Line X1="10" Y1="100" X2="80" Y2="30" Stroke="Red" StrokeThickness="20" Canvas.Top="-16" Canvas.Left="238"></Line>
    </Canvas>
    </Grid>