dialogs must be user-initiated silverlight 4
-
Hello, While exporting the telerik chart to PNG image format, I received below mentioned error message. dialogs must be user-initiated. Perhaps the image is saved successfully. Can any one can help me why I got this type of error message? Here is my code: try { SaveFileDialog dialog = new SaveFileDialog(); dialog.DefaultExt = ".png"; dialog.Filter = "Portable Network Graphics (*.png)|*.png"; bool? showDialog = dialog.ShowDialog(); if (showDialog == true) { Stream fileStream = dialog.OpenFile(); MainChart.ExportToImage(fileStream, new Telerik.Windows.Media.Imaging.PngBitmapEncoder()); fileStream.Close(); } }
-
Hello, While exporting the telerik chart to PNG image format, I received below mentioned error message. dialogs must be user-initiated. Perhaps the image is saved successfully. Can any one can help me why I got this type of error message? Here is my code: try { SaveFileDialog dialog = new SaveFileDialog(); dialog.DefaultExt = ".png"; dialog.Filter = "Portable Network Graphics (*.png)|*.png"; bool? showDialog = dialog.ShowDialog(); if (showDialog == true) { Stream fileStream = dialog.OpenFile(); MainChart.ExportToImage(fileStream, new Telerik.Windows.Media.Imaging.PngBitmapEncoder()); fileStream.Close(); } }
Where are you calling this code from? Silverlight expects the SaveFileDialog to be instantiated from a user initiated event (such as responding to a Button.Click).
Forgive your enemies - it messes with their heads
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Where are you calling this code from? Silverlight expects the SaveFileDialog to be instantiated from a user initiated event (such as responding to a Button.Click).
Forgive your enemies - it messes with their heads
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Hello, While exporting the telerik chart to PNG image format, I received below mentioned error message. dialogs must be user-initiated. Perhaps the image is saved successfully. Can any one can help me why I got this type of error message? Here is my code: try { SaveFileDialog dialog = new SaveFileDialog(); dialog.DefaultExt = ".png"; dialog.Filter = "Portable Network Graphics (*.png)|*.png"; bool? showDialog = dialog.ShowDialog(); if (showDialog == true) { Stream fileStream = dialog.OpenFile(); MainChart.ExportToImage(fileStream, new Telerik.Windows.Media.Imaging.PngBitmapEncoder()); fileStream.Close(); } }