Hi All,
I am developing an application using Silverlight Ink.
I have completed writing and erasing and working fine.
Now I have to add a functionality to save the content to an image entered by user when he clicks a save button.
I am unable to get that done. I have used this code and not working for me.
RenderTargetBitmap target = new RenderTargetBitmap((int)inkCtrl.ActualWidth, (int)inkCtrl.ActualHeight, 96d, 96d, PixelFormats.Default);
target.Render(inkCtrl);
PngBitmapEncoder encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(target));
FileStream fs = File.Open(@"c:\stuff\InkWithEffects.png", FileMode.OpenOrCreate);
encoder.Save(fs);
fs.Close();
When I try to build the app, it is throwing an error says
The type or namespace name 'PngBitmapEncoder' could not be found (are you missing a using directive or an assembly reference?)
I have added library System.Windows.Media.Imaging; But no use.
Please save me.
Thanks in Advance.