0

i want to display image in wpf application, that image will be drawn as graph based on the data entered by the user....when the suer clicks the submit button after entering the data the image(graph) should be displayed on the form..i did the same in my winform app using the code pasted below

string mData = txtmData.Text;
Graphics g = pictureBox1.CreateGraphics();
Brush br = new SolidBrush(Color.Black);
g.DrawString("*" + mData + "*", mFont, br, 50, 50);

in WPF i don't fine alternative for pictureBox1.CreateGraphics();

Harry
  • 41
  • 1
  • 2
  • 5
  • [How to draw on a Window in WPF (best practice)](http://stackoverflow.com/questions/5585990/how-to-draw-on-a-window-in-wpf-best-practice) maybe that will be helpful for you – Mark Jun 28 '13 at 10:13
  • You may take a look at the example in [RenderTargetBitmap](http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.rendertargetbitmap.aspx). – Clemens Jun 28 '13 at 10:14
  • You really shouldn't draw on a picturebox like that in winforms either... – Pondidum Jun 28 '13 at 10:15

0 Answers0