-2

I am trying to print the image that displayed in ImageBox. I found this solution but when I tried it I got the following error:

enter image description here

What am I missing?

Thanks in advance.

Community
  • 1
  • 1
Abdulsalam Elsharif
  • 4,773
  • 7
  • 32
  • 66
  • Possible duplicate of [C# - Convert WPF Image.source to a System.Drawing.Bitmap](http://stackoverflow.com/questions/5689674/c-sharp-convert-wpf-image-source-to-a-system-drawing-bitmap) – Massimiliano Kraus Apr 01 '17 at 17:44

2 Answers2

0

The property on imagebox is Image, with an uppercase "I", not image.

See the documentation.

Massimiliano Kraus
  • 3,638
  • 5
  • 27
  • 47
0

You could use the PrintDialog.PrintVisual method to print out an Image in WPF:

PrintDialog pd = new PrintDialog();
myPrintDialog.PrintVisual(imagebox, "Image");
mm8
  • 163,881
  • 10
  • 57
  • 88