Nevron Forum

Making emf transparent

https://www.nevron.com/Forum/Topic5832.aspx

By Nick Howard - Wednesday, November 9, 2011

Maybe I'm missing something, but can I print to an emf file and have it be transparent? I'm having trouble finding what setting I need to set to make that happen. Any suggestions?

Thanks for the help, I sincerely appreciate it.

Thanks,
Nick
By Nevron Support - Wednesday, November 9, 2011

Hi Nick,

You'll have to set the background fill style to transparent and disable the control frame - for example:

using (NChartControl control = new NChartControl())
{
 NCartesianChart chart = (NCartesianChart)control.Charts[0];

 NBarSeries bar = new NBarSeries();
 bar.Values.Add(10);
 bar.Values.Add(20);
 bar.Values.Add(30);
 chart.Series.Add(bar);

 control.BackgroundStyle.FillStyle = new NColorFillStyle(Color.Transparent);
 control.BackgroundStyle.FrameStyle.Visible = false;

 control.ImageExporter.CopyToClipboard(new NSize(400, 400), NResolution.ScreenResolution, new NEmfImageFormat());
}

places a 400x400 emf file to the clipboard.

By Nick Howard - Wednesday, November 9, 2011

Great! Thank you very much. I could have sworn that I had tried that once. Working great now.