We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to disable the chart saving dialog

Hello,

In the program attached, if you click on the floppy disk, my save function is called. If you click on the chart, and then on the floppy disk, a chart saving dialog appears (to save in picture format). How can I disable the popping of this dialog and keep the call to my saving function ?
By the way this dialog could become handy, is there any way to make it appear via the charts API ?
Thank you for your help.

Cordially,

Olivier Vayssié



ChartPictureSaveDialog_c710ba69.rar

5 Replies

PI Poorani Idhaya Bala M.A Syncfusion Team March 3, 2010 06:59 AM UTC

Hi Olivier,

Thanks for choosing Syncfusion Products.

Application.Save command is binded in the chart control to save the chart.If the chart is focused, save function which is defined in the chart assembly is called instead of the user defined function. To avoid this ,please cancel the function calling by setting the e.Handle value to true in previewMouseDown event of the chart control.

Please find the attached sample.

Let me know if you have any questions.

Thanks,
Poorani



ChartPictureSaveDialog_5b3c5661.zip


OV Olivier VAYSSIE March 3, 2010 12:07 PM UTC

Thank you for your answer. The problem is I need to compute the clicks (left and right) on the children of chart (area, series, etc..). With this solution I don't receive the events anymore.
Cordially,
Olivier Vayssié


PI Poorani Idhaya Bala M.A Syncfusion Team March 5, 2010 01:00 PM UTC

Hi Olivier,

Thanks for choosing Syncfusion Products.

Please find the attached sample. You can achieve your requirement by overriding the event handler method of the chart by your method.

C#:

this.Chart1.CommandBindings.Add(new CommandBinding(ApplicationCommands.Save, SaveExecute));

Let me know if you have any questions.

Thanks,
Poorani



ChartPictureSaveDialog (2)_552e125.zip


OV Olivier VAYSSIE March 8, 2010 10:26 AM UTC

Hello,
It works. In SaveExecute, I used the code
void SaveExecute(object sender, ExecutedRoutedEventArgs e)
{
FrameworkElement fe = Parent as FrameworkElement;
if(fe!=null)
fe.RaiseEvent(e);
}
to get the save of my application to pop.

Cordially,

Olivier Vayssié


PI Poorani Idhaya Bala M.A Syncfusion Team March 10, 2010 03:29 AM UTC

Hi Olivier,


Thanks for choosing Syncfusion products.

We are glad to hear that your problem has been resolved. Please do not hesitate to open a new forum if you ever need further assistance from us.

Regards,
Poorani

Loader.
Live Chat Icon For mobile
Up arrow icon