Silverlight 4 Canvas.Left binding without canvas per item -


i'm getting performance issues code, mousing on canvas area laggy if leave in canvases within data template, no lag if take them out (but canvas.left bindings don't work ellipses in wrong place!) there way position these items without each 1 needing own canvas?

    <canvas>         <itemscontrol itemssource="{binding path=spatialdata.trainevents.arrdepellipseoflines}" name="ctrlcharttraineventsarrdep" >   <itemscontrol.itemtemplate>     <datatemplate>       <canvas>         <ellipse width="{binding eventshape.width}" height="{binding eventshape.height}" stroke="{binding path=stroke}" strokethickness="{binding strokethickness}" fill="{binding path=fill}" canvas.left="{binding canvasplacement.x}" canvas.top="{binding canvasplacement.y}" />       </canvas>     </datatemplate>   </itemscontrol.itemtemplate>  </itemscontrol> </canvas> 

thanks much, becky

yes, can remove canvas in ellipse. think you'll find values canvasplacement.x don't increment per ellipse , effect seeing fact each element in itemscontrol placed in stackpanel (the default behaviour , can changed via itemspanel property) laying these out - in horizontal line.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -