WPF: Best way to get a snapshot of what is under a Canvas control -


i have wpf app, , use canvas 50% opacity cropping rect can resized , moved on image, , every time moves, use croppedbitmap show live preview of image, makes app become slow create new croppedbitmap every time...

what's best way image of area canvas is?

thanks!

you can use visualbrush , point canvas

<stackpanel >   <canvas x:name="mycanvas" width="10" height="10" horizontalalignment="left" cliptobounds="true">     <ellipse fill="black" width="10" height="20" />   </canvas>   <border height="30" width="30" horizontalalignment="left">     <border.background>       <visualbrush visual="{binding elementname=mycanvas}"  />     </border.background>   </border> </stackpanel> 

Comments

Popular posts from this blog

List<T>().Add problem C# -

Javascript natural sort array/object and maintain index association -