简体   繁体   English

wpf在图像中显示绘图

[英]wpf display drawing in an Image

I recently started learning WPF. 我最近开始学习WPF。 In my program I need to draw a picture at runtime and display it. 在我的程序中,我需要在运行时绘制图片并将其显示。 It seems that I should use Image class, but how should I paint the picture and display it? 看来我应该使用Image类,但是应该如何绘画并显示它呢? Using windows forms I would initialize Graphics and draw in a Bitmap displaying it in a PictureBox. 使用Windows窗体,我将初始化Graphics并绘制一个位图,将其显示在PictureBox中。 Can I do something simmilar in WPF? 我可以在WPF中做类似的事情吗? Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM