Skip to content

Commit ef495b8

Browse files
committed
Merge pull request #6 from thiagoboche/patch-1
Adding the clipboard part of the code
2 parents 1c54186 + 2bc2d18 commit ef495b8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

export/export-png.rst

+9-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ Copy to clipboard
2828
{
2929
var pngExporter = new PngExporter();
3030
pngExporter.Export(plotModel, stream, 600, 400, Brushes.White);
31+
32+
var bitmap = new BitmapImage();
33+
bitmap.BeginInit();
34+
bitmap.StreamSource = stream;
35+
bitmap.CacheOption = BitmapCacheOption.OnLoad;
36+
bitmap.EndInit();
37+
bitmap.Freeze();
38+
39+
Clipboard.SetImage(bitmap);
3140
}
32-
33-
// TODO : write content of stream to clipboard

0 commit comments

Comments
 (0)