Ejemplo n.º 1
0
        private void OnExportImage(object obj)
        {
            if (null == Visualization)
            {
                return;
            }

            VisualImageExporter exporter = new VisualImageExporter();

            using (Stream stm = File.Create(_name + ".png"))
            {
                exporter.Export(Visualization, stm);
            }
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        private void OnExportImage(object obj)
        {
            if (null == Visualization)
            {
                return;
            }

            VisualImageExporter exporter = new VisualImageExporter();

            using (Stream stm = File.Create( _name + ".png"))
            {
                exporter.Export( Visualization, stm );
            }
        }