'Telerik.Windows.Controls.RadDiagram' does not contain a definition for 'ExportToImage'

2 posts, 1 answers
  1. Shrikant
    Shrikant avatar
    38 posts
    Member since:
    Jul 2011

    Posted 23 Apr 2012 Link to this post

    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

    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");
                  dialog.DefaultExt = "BMP".ToLower();
                  dialog.Filter = string.Format("{1} File (*.{0}) | *.{0}", "BMP".ToLower(), "BMP");
              if (!(bool)dialog.ShowDialog())
              Stream fileStream = dialog.OpenFile();
              if (isPng)
                  this.diagram.ExportToImage(fileStream, new BmpBitmapEncoder());
  2. Answer
    Zarko avatar
    755 posts

    Posted 24 Apr 2012 Link to this post

    Hello Shrikant,
    The ExportToImage method was added to the RadDiagram with the 2012.1.306 internal build and that's why you're getting this error with older versions (2012.1.215).
    If you want to use this functionality you'll have to download a newer version and if you have further questions please feel free to ask.

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top