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

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

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