> Where might I find examples and/or documentation on > SharpVectorGraphics? I will be using it to show an SVG in my C# app > but I will also need some interaction. For example, when clicking a > certain element it should become highlighted by changing its color. > I've read about this being possible (not sure where though) but > couldn't yet figure out how.
// After loading... ISvgDocument doc = svgPictureBox.Window.Document; doc.RootElement.AddEventListener("click", new EventListener(ClickHandler), false); doc.RootElement.AddEventListener("mousedown", new EventListener(MouseDownHandler), false); doc.RootElement.AddEventListener("mouseup", new EventListener(MouseUpHandler), false); doc.RootElement.AddEventListener("mousemove", new EventListener(MouseMoveHandler), false); doc.RootElement.AddEventListener("mouseover", new EventListener(MouseOverHandler), false); doc.RootElement.AddEventListener("mouseout", new EventListener(MouseOutHandler), false); etc.... public void MouseOverHandler(IEvent e) { SvgElement aGraphic = null; if (e.Target is SvgElement) aGraphic = ((SvgElement)e.Target); else if (e.Target is SvgElementInstance) aGraphic = (SvgElement)((SvgElementInstance)e.Target).CorrespondingUseElement; aGraphic.SetAttribute("stroke", "cyan"); svgPictureBox1.Render(); } And so on... keep in mind, this only works from the CVS version, re-rendering is not optimized, and if you are planning on using GetCTM, GetTransformToElement, GetScreenCTM or the like, wait. I will be finished in a couple more days I think... Cheers, Jeff Rafter ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/