开发者

How can I render a wpf control to a DrawingContext?

开发者 https://www.devze.com 2023-01-10 22:03 出处:网络
Can I get a Geometry of a Visual/UIElement/FrameworkElement and use DrawingContext.DrawDrawing ? Currently I am us开发者_如何学Pythoning a RenderTargetBitmap, draw my Visual to it and use DrawingCont

Can I get a Geometry of a Visual/UIElement/FrameworkElement and use DrawingContext.DrawDrawing ?

Currently I am us开发者_如何学Pythoning a RenderTargetBitmap, draw my Visual to it and use DrawingContext.DrawImage .


Can you expand on what you are trying to achieve? I was playing around with an adorner today trying to draw a control from the OnRender method into the DrawingContext. I quit that was simply able to add the control to my Adorner's Visual and Logical tree; this made the control render itself and be completely functional.

0

精彩评论

暂无评论...
验证码 换一张
取 消