private void OnExportImage(object obj) { if (null == Visualization) { return; } VisualImageExporter exporter = new VisualImageExporter(); using (Stream stm = File.Create(_name + ".png")) { exporter.Export(Visualization, stm); } }
protected Bitmap ConvertViewToBitmap() { var view = GetViewFromInputObject(); var exporter = new VisualImageExporter(); Bitmap bitmap = null; using (var ms = new MemoryStream()) { view.Dispatcher.Invoke((Action)(() => exporter.Export(view, ms))); ms.Position = 0; bitmap = new Bitmap(ms); } return(bitmap); }
private void OnExportImage(object obj) { if (null == Visualization) { return; } VisualImageExporter exporter = new VisualImageExporter(); using (Stream stm = File.Create( _name + ".png")) { exporter.Export( Visualization, stm ); } }