This question is locked. New answers and comments are not allowed.
Hi Telerik Team,
In diagram Design Toolbox demo code, I am getting error on ExportToImage Function
Error : 'Telerik.Windows.Controls.RadDiagram' does not contain a definition for 'ExportToImage' and no extension method 'ExportToImage' accepting a first argument of type 'Telerik.Windows.Controls.RadDiagram' could be found (are you missing a using directive or an assembly reference?)
however,This function is not present in Demo Code at user side.
Telerik Version : 2012.1.215.1050
In diagram Design Toolbox demo code, I am getting error on ExportToImage Function
Error : 'Telerik.Windows.Controls.RadDiagram' does not contain a definition for 'ExportToImage' and no extension method 'ExportToImage' accepting a first argument of type 'Telerik.Windows.Controls.RadDiagram' could be found (are you missing a using directive or an assembly reference?)
however,This function is not present in Demo Code at user side.
Telerik Version : 2012.1.215.1050
private void ExportToImage(bool isPng)
{
SaveFileDialog dialog = new SaveFileDialog();
if (isPng)
{
dialog.DefaultExt = "PNG".ToLower();
dialog.Filter = string.Format("{1} File (*.{0}) | *.{0}", "PNG".ToLower(), "PNG");
}
else
{
dialog.DefaultExt = "BMP".ToLower();
dialog.Filter = string.Format("{1} File (*.{0}) | *.{0}", "BMP".ToLower(), "BMP");
}
if (!(bool)dialog.ShowDialog())
return;
Stream fileStream = dialog.OpenFile();
if (isPng)
this.diagram.ExportToImage(fileStream);
else
this.diagram.ExportToImage(fileStream, new BmpBitmapEncoder());
fileStream.Close();
}