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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -